Skip to main content

Installation

Qpon can be deployed using Docker. It requires a PostgreSQL database to run.

The latest image is available on Docker Hub at labsatquicko/qpon:latest

Download the compose file​

curl -LO https://github.com/org-quicko/qpon/raw/main/docker-compose.yml

Set the environment variables​

curl -LO https://github.com/org-quicko/qpon/raw/main/.env.example

# create a .env file and set the environment variables
cp .env.example .env

Start the services​

docker compose up -d

Visit http://localhost:3000/setup to set up the super admin user.

Environment Variables​

VariableDescriptionExample
DATABASE_URLFull Postgres connection string used by the API to connect (required)postgres://qpon_user:strongpassword@db:5432/qpon_db
DB_SCHEMAPostgres schema for tables/migrations (defaults to public)qpon
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)true
MIN_DB_POOL_SIZEMinimum connections kept in the Postgres pool (defaults to 0)0
MAX_DB_POOL_SIZEMaximum connections in the Postgres pool (defaults to 5)5
DB_USERNAMEPostgres user, used to provision the db container in Docker Composeqpon_user
DB_PASSWORDPostgres password, used to provision the db container in Docker Composestrongpassword
DB_NAMEPostgres database name, used to provision the db container in Docker Composeqpon_db
JWT_SECRETJWT signing secretany-random-string
SALT_ROUNDSBcrypt salt rounds for passwords10

These variables can be set in a .env file, in your shell, or directly in docker-compose.yml. The API only reads DATABASE_URL (and optionally DB_SCHEMA, DB_SSL, DB_SSL_REJECT_UNAUTHORIZED, MIN_DB_POOL_SIZE, MAX_DB_POOL_SIZE) to connect — DB_USERNAME/DB_PASSWORD/DB_NAME are used solely to provision the Postgres container when using Docker Compose; embed matching values in DATABASE_URL yourself.

Notes when using DB_SCHEMA:

  • The schema must already exist in the database before the app starts or migrations run (e.g. CREATE SCHEMA IF NOT EXISTS <schema>;). Postgres does not auto-create it, and if it's missing, table creation silently falls back to public instead of failing loudly.

Notes when using DB_SSL:

  • Most managed Postgres (RDS, Aurora, etc.) requires or enforces TLS. Set DB_SSL=true to connect over TLS.
  • Certificate verification (DB_SSL_REJECT_UNAUTHORIZED=true) is off by default because Node doesn't trust Amazon's RDS CA out of the box — enabling it without also supplying that CA will fail to connect. Leave it unset/false unless you've configured a trusted CA.