Installation
Cliq is a self-hosted affiliate software solution. It can be deployed using Docker and requires a PostgreSQL database and Redis instance to run.
Prerequisites
- Docker for containerized deployment
- PostgreSQL
- Redis for caching, queues, and background jobs
Docker
To run the entire stack using Docker Compose:
Download the compose file
curl -LO https://github.com/org-quicko/cliq/raw/main/docker-compose.yml
Set the environment variables
curl -LO https://github.com/org-quicko/cliq/raw/main/.env.example
# create a .env file and set the environment variables
cp .env.example .env
Start the services
docker compose up -d
Environment Variables
| Variable | Description | Example |
|---|---|---|
| DB_URL | PostgreSQL connection URL | postgres://cliq_user:strongpassword@db:5432/cliq_db (use db for Docker) |
| DB_SCHEMA | Database schema to use | public |
| DB_SSL | Enable TLS for the Postgres connection (needed for most managed Postgres, e.g. RDS/Aurora) | true |
| DB_SSL_REJECT_UNAUTHORIZED | Verify the server certificate against Node's trusted CAs (defaults to false) | false |
| MAX_DB_POOL_SIZE | Maximum connections in the database pool (defaults to 5) | 5 |
| MIN_DB_POOL_SIZE | Minimum connections kept in the database pool (defaults to 0) | 0 |
| JWT_SECRET | JWT signing secret | any-random-string |
| REDIS_HOST | Redis host | redis (use redis for Docker) |
| REDIS_PORT | Redis port | 6379 |
These variables can be set in a .env file, in your shell, or directly in docker-compose.yml.