Files
merchbay_admin/docker-compose.portainer.yml
Frank John Begornia 0cedc90031
Some checks failed
Deploy Development / deploy (push) Failing after 29s
Add CI/CD workflows for development and production deployments
- Created `deploy-dev.yml` for automated deployment to the development server on push to the `dev` branch.
- Created `deploy.yml` for automated deployment to the production server on push to the `main` or `master` branches.
- Added deployment instructions in `DEPLOYMENT-PORTAINER.md` for using Portainer and Traefik.
- Documented Gitea Actions deployment process in `DEPLOYMENT.md`.
- Configured Traefik SSL settings in `TRAEFIK-SSL-CONFIG.md` for both development and production environments.
- Implemented a deployment script `deploy.sh` for manual deployments.
- Added Docker Compose configurations for development (`docker-compose.portainer.dev.yml`) and production (`docker-compose.portainer.yml`) environments.
- Updated main `docker-compose.yml` to support Traefik integration and environment variable configurations.
2025-12-12 01:24:50 +08:00

52 lines
1.7 KiB
YAML

version: '3.8'
# Production Stack - Portainer Configuration
# Deploy this through Portainer UI: Stacks -> Add Stack -> Web Editor
# Branch: main - Uses paid SSL certificate
services:
app:
image: merchbay_admin:latest
container_name: merchbay_admin_prod
restart: unless-stopped
environment:
- APP_ENV=production
- APP_DEBUG=false
- APP_URL=https://merchbay.app
- DB_CONNECTION=mysql
- DB_HOST=your-mysql-host
- DB_PORT=3306
- DB_DATABASE=merchbay_admin
- DB_USERNAME=your-mysql-user
- DB_PASSWORD=your-mysql-password
volumes:
- app_storage:/var/www/html/storage
- app_uploads:/var/www/html/public/uploads
# Mount paid SSL certificates
- /path/to/ssl/certs:/etc/ssl/certs:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.merchbay-admin.rule=Host(`merchbay.app`)"
- "traefik.http.routers.merchbay-admin.entrypoints=websecure"
- "traefik.http.routers.merchbay-admin.tls=true"
# Use custom TLS configuration (file provider for paid cert)
# Ensure Traefik has file provider configured with your paid SSL cert
- "traefik.http.services.merchbay-admin.loadbalancer.server.port=80"
# HTTP to HTTPS redirect
- "traefik.http.routers.merchbay-admin-http.rule=Host(`merchbay.app`)"
- "traefik.http.routers.merchbay-admin-http.entrypoints=web"
- "traefik.http.routers.merchbay-admin-http.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
networks:
- traefik-public
volumes:
app_storage:
driver: local
app_uploads:
driver: local
networks:
traefik-public:
external: true