Skip to content

Portainer

Portainer can deploy the same production stack defined in docker/compose.prod.yml. No Portainer-specific image is required.

  1. Registry access — In Portainer (or your environment), add credentials for your container registry so the host can pull CI-built images.

  2. Environment files — On the Docker host, clone the repository or copy:

    • .env.production (from .env.production.example)
    • api/.env.production (from api/.env.production.example)
  3. Create a Stack — In Portainer: StacksAdd stackWeb editor or Upload, using docker/compose.prod.yml. Add Compose profile www in the stack settings if you want the marketing site.

  4. Env injection — Either:

    • Set stack environment variables in the Portainer UI to match .env.production, or
    • Mount/env-file paths that resolve on the host (paths must exist on the Docker host, not inside Portainer’s UI only).
  5. Deploy — Deploy the stack. Confirm Postgres and Redis are healthy before the API serves traffic.

  6. Reverse proxy — Configure your external proxy to reach the published ports documented in Docker Compose.

After CI pushes new tags:

  1. Update image tags in stack env or .env.production.
  2. Pull and redeploy the stack from Portainer.
  3. Run migrations (stack exec or one-off container): php artisan migrate --force.