diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 7edadae..6c3747d 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -52,6 +52,10 @@ services: condition: service_healthy environment: PGMANAGE_LISTEN_PORT: "8000" + PGMANAGE_DEFAULT_USERNAME: ${PGMANAGE_DEFAULT_USERNAME:-admin} + PGMANAGE_DEFAULT_PASSWORD: ${PGMANAGE_DEFAULT_PASSWORD:-admin} + PGMANAGE_LICENSE_KEY: ${PGMANAGE_LICENSE_KEY:-} + PGMANAGE_SECURE_COOKIES: ${PGMANAGE_SECURE_COOKIES:-False} ports: - "8000:8000" volumes: diff --git a/docker-compose.pgmanage.yml b/docker-compose.pgmanage.yml index 99f7fcd..c27372d 100644 --- a/docker-compose.pgmanage.yml +++ b/docker-compose.pgmanage.yml @@ -11,7 +11,8 @@ services: PGMANAGE_LISTEN_PORT: "8000" PGMANAGE_DEFAULT_USERNAME: ${PGMANAGE_DEFAULT_USERNAME:-admin} PGMANAGE_DEFAULT_PASSWORD: ${PGMANAGE_DEFAULT_PASSWORD:-admin} - PGMANAGE_SECURE_COOKIES: "True" + PGMANAGE_LICENSE_KEY: ${PGMANAGE_LICENSE_KEY:-} + PGMANAGE_SECURE_COOKIES: ${PGMANAGE_SECURE_COOKIES:-False} extra_hosts: - "host.docker.internal:host-gateway" volumes: diff --git a/docker-compose.production.yml b/docker-compose.production.yml index e6f0a00..8867b80 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -190,7 +190,8 @@ services: PGMANAGE_LISTEN_PORT: "8000" PGMANAGE_DEFAULT_USERNAME: ${PGMANAGE_DEFAULT_USERNAME:-admin} PGMANAGE_DEFAULT_PASSWORD: ${PGMANAGE_DEFAULT_PASSWORD:-admin} - PGMANAGE_SECURE_COOKIES: "True" + PGMANAGE_LICENSE_KEY: ${PGMANAGE_LICENSE_KEY:-} + PGMANAGE_SECURE_COOKIES: ${PGMANAGE_SECURE_COOKIES:-True} volumes: - pgmanage_prod_data:/appdata - ./docker/pgmanage/override.py:/appdata/override.py:ro diff --git a/docs/DOCKER.md b/docs/DOCKER.md index f4191d1..2388014 100644 --- a/docs/DOCKER.md +++ b/docs/DOCKER.md @@ -90,6 +90,8 @@ docker compose -f docker-compose.pgmanage.yml up -d It publishes `http://localhost:8000` with a standard Docker port mapping and persists its data in the named Docker volume `pgmanage_data`. From inside the container, connect to the local Postgres service through `host.docker.internal:5432`. +For local HTTP access, pgManage defaults `PGMANAGE_SECURE_COOKIES=False`. If you expose it behind HTTPS instead, set `PGMANAGE_SECURE_COOKIES=True`. +If you are using the enterprise image, set `PGMANAGE_LICENSE_KEY` to remove the startup license error. ### Test @@ -154,11 +156,13 @@ Open `.env.docker.production` and fill in every value. The minimum required secr | `JWT_SECRET` | Long random string (e.g. `openssl rand -hex 64`) | | `ACME_EMAIL` | Your email for Let's Encrypt notifications | | `RESEND_API_KEY` | Resend API key (or configure SMTP vars instead) | +| `PGMANAGE_DOMAIN` | Hostname for pgManage, e.g. `pgmanage.rentaldrivego.ma` | Production now derives `DATABASE_URL` inside the app container from `POSTGRES_HOST`, `POSTGRES_PORT`, `POSTGRES_DB`, `POSTGRES_USER`, and `POSTGRES_PASSWORD` when `DATABASE_URL_FROM_POSTGRES=true`. That avoids Prisma auth failures when the database password contains reserved URL characters such as `@`, `:`, or `/`. The example file uses `rentaldrivego.ma` for the marketplace and public site. The dashboard and admin panel are routed under that same host at `/dashboard` and `/admin`. Set `PORTAINER_DOMAIN=portainer.rentaldrivego.ma` in `.env.docker.production` to expose Portainer through Traefik. +Set `PGMANAGE_DOMAIN=pgmanage.rentaldrivego.ma` to expose pgManage through Traefik, and set `PGMANAGE_LICENSE_KEY` if you are running the enterprise image. #### 4a. Configure the registry for CI deploys