Portainer
Overview
Section titled “Overview”Portainer can deploy the same production stack defined in docker/compose.prod.yml. No Portainer-specific image is required.
-
Registry access — In Portainer (or your environment), add credentials for your container registry so the host can pull CI-built images.
-
Environment files — On the Docker host, clone the repository or copy:
.env.production(from.env.production.example)api/.env.production(fromapi/.env.production.example)
-
Create a Stack — In Portainer: Stacks → Add stack → Web editor or Upload, using
docker/compose.prod.yml. Add Compose profilewwwin the stack settings if you want the marketing site. -
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).
- Set stack environment variables in the Portainer UI to match
-
Deploy — Deploy the stack. Confirm Postgres and Redis are healthy before the API serves traffic.
-
Reverse proxy — Configure your external proxy to reach the published ports documented in Docker Compose.
Update images
Section titled “Update images”After CI pushes new tags:
- Update image tags in stack env or
.env.production. - Pull and redeploy the stack from Portainer.
- Run migrations (stack exec or one-off container):
php artisan migrate --force.