1.3 KiB
1.3 KiB
Portainer deployment
Use docker-compose.yml as a Portainer Stack from this repository. It deploys the frontend, API, and PostgreSQL as one internal Docker network. Only the web container exposes a port; it proxies /api to the API container.
Required Portainer environment variables
POSTGRES_PASSWORD: a long, unique database password. Avoid characters that are not URL-safe because it is used inDATABASE_URL.JWT_SECRET: a unique random string of at least 32 characters.FRONTEND_ORIGIN: the exact public application URL, for examplehttps://hub.example.com.
Optional variables:
POSTGRES_DB(defaultcompor_hub)POSTGRES_USER(defaultcompor)WEB_PORT(default8080)
Before publishing
- Deploy the stack with a temporary
WEB_PORTand verify/api/v1/healththrough the public domain. - Create the production administrator using the API container's console and
npm run db:bootstrap-admin, with theBOOTSTRAP_ADMIN_*variables supplied only for that one command. - Place the web service behind HTTPS, normally through your existing reverse proxy (Traefik, Nginx Proxy Manager, or Cloudflare Tunnel), and set
FRONTEND_ORIGINto that HTTPS address. - Back up the
compor_postgres_datavolume before updates.
Do not expose port 5432 or port 3001 publicly.