Files
compor-academy/PORTAINER.md
Cauê Faleiros b0bea7ec8f
All checks were successful
CI / Validate frontend and API (push) Successful in 28s
chore: make root compose file the Portainer stack
2026-08-31 13:22:09 -03:00

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 in DATABASE_URL.
  • JWT_SECRET: a unique random string of at least 32 characters.
  • FRONTEND_ORIGIN: the exact public application URL, for example https://hub.example.com.

Optional variables:

  • POSTGRES_DB (default compor_hub)
  • POSTGRES_USER (default compor)
  • WEB_PORT (default 8080)

Before publishing

  1. Deploy the stack with a temporary WEB_PORT and verify /api/v1/health through the public domain.
  2. Create the production administrator using the API container's console and npm run db:bootstrap-admin, with the BOOTSTRAP_ADMIN_* variables supplied only for that one command.
  3. Place the web service behind HTTPS, normally through your existing reverse proxy (Traefik, Nginx Proxy Manager, or Cloudflare Tunnel), and set FRONTEND_ORIGIN to that HTTPS address.
  4. Back up the compor_postgres_data volume before updates.

Do not expose port 5432 or port 3001 publicly.