81 lines
2 KiB
YAML
81 lines
2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
|
|
cmc-php-staging:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
platform: linux/amd64
|
|
container_name: cmc-php-staging
|
|
depends_on:
|
|
- db-staging
|
|
volumes:
|
|
- staging_pdf_data:/var/www/cmc-sales/app/webroot/pdf
|
|
- staging_attachments_data:/var/www/cmc-sales/app/webroot/attachments_files
|
|
network_mode: bridge
|
|
restart: unless-stopped
|
|
environment:
|
|
- APP_ENV=staging
|
|
|
|
nginx-staging:
|
|
image: nginx:latest
|
|
hostname: nginx-staging
|
|
container_name: cmc-nginx-staging
|
|
ports:
|
|
- "8081:80" # Internal port for staging
|
|
volumes:
|
|
- ./conf/nginx-staging.conf:/etc/nginx/conf.d/cmc-staging.conf
|
|
- ./userpasswd:/etc/nginx/userpasswd:ro
|
|
depends_on:
|
|
- cmc-php-staging
|
|
restart: unless-stopped
|
|
network_mode: bridge
|
|
environment:
|
|
- NGINX_ENVSUBST_TEMPLATE_SUFFIX=.template
|
|
|
|
db-staging:
|
|
image: mariadb:latest
|
|
container_name: cmc-db-staging
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD_STAGING}
|
|
MYSQL_DATABASE: cmc_staging
|
|
MYSQL_USER: cmc_staging
|
|
MYSQL_PASSWORD: ${DB_PASSWORD_STAGING}
|
|
volumes:
|
|
- staging_db_data:/var/lib/mysql
|
|
network_mode: bridge
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3307:3306" # Different port for staging DB access
|
|
|
|
cmc-go-staging:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.go.staging
|
|
container_name: cmc-go-staging
|
|
environment:
|
|
DB_HOST: db-staging
|
|
DB_PORT: 3306
|
|
DB_USER: cmc_staging
|
|
DB_PASSWORD: ${DB_PASSWORD_STAGING}
|
|
DB_NAME: cmc_staging
|
|
PORT: 8080
|
|
APP_ENV: staging
|
|
depends_on:
|
|
db-staging:
|
|
condition: service_started
|
|
ports:
|
|
- "8082:8080" # Direct access for testing
|
|
volumes:
|
|
- staging_pdf_data:/root/webroot/pdf
|
|
- ./credentials/staging:/root/credentials:ro # Staging Gmail credentials
|
|
network_mode: bridge
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
staging_db_data:
|
|
staging_pdf_data:
|
|
staging_attachments_data:
|
|
|