Skip to main content

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​

VariableDescriptionExample
DB_URLPostgreSQL connection URLpostgres://cliq_user:strongpassword@db:5432/cliq_db (use db for Docker)
DB_SCHEMADatabase schema to usepublic
DB_SSLEnable TLS for the Postgres connection (needed for most managed Postgres, e.g. RDS/Aurora)true
DB_SSL_REJECT_UNAUTHORIZEDVerify the server certificate against Node's trusted CAs (defaults to false)false
MAX_DB_POOL_SIZEMaximum connections in the database pool (defaults to 5)5
MIN_DB_POOL_SIZEMinimum connections kept in the database pool (defaults to 0)0
JWT_SECRETJWT signing secretany-random-string
REDIS_HOSTRedis hostredis (use redis for Docker)
REDIS_PORTRedis port6379

These variables can be set in a .env file, in your shell, or directly in docker-compose.yml.