cmc-sales/docker-compose.stg.yml

127 lines
3.1 KiB
YAML
Raw Permalink Normal View History

2025-09-13 05:42:31 -07:00
services:
2025-09-13 05:40:19 -07:00
postfix:
image: boky/postfix
restart: unless-stopped
container_name: cmc-stg-postfix
2025-09-13 05:40:19 -07:00
# Staging: relay to Mailpit (no authentication required)
environment:
2025-09-14 03:59:15 -07:00
- RELAYHOST=mailpit:1025
- ALLOWED_SENDER_DOMAINS=cmctechnologies.com.au
2025-09-13 05:40:19 -07:00
# --- Gmail SMTP relay settings (uncomment for production) ---
# - RELAYHOST=smtp-relay.gmail.com
# - RELAYHOST_PORT=587
# - SMTP_USERNAME=sales
# - SMTP_PASSWORD=S%s'mMZ})MGsg$k!5N|mPSQ>
# - SMTP_TLS_SECURITY_LEVEL=encrypt
# - SMTP_USE_TLS=yes
# - SMTP_USE_STARTTLS=yes
2025-09-14 00:49:07 -07:00
networks:
- cmc-stg-network
2025-07-23 03:00:06 -07:00
nginx:
image: nginx:latest
container_name: cmc-stg-nginx
2025-07-23 03:00:06 -07:00
hostname: nginx-stg
ports:
- "8081:80" # Staging nginx on different port
volumes:
- ./conf/nginx-site.stg.conf:/etc/nginx/conf.d/cmc.conf
2025-07-23 03:00:06 -07:00
- ./userpasswd:/etc/nginx/userpasswd:ro
depends_on:
- cmc-stg-php
restart: unless-stopped
networks:
- cmc-stg-network
cmc-stg-php:
build:
context: .
dockerfile: Dockerfile.stg.php
2025-07-23 03:00:06 -07:00
container_name: cmc-stg-php
environment:
2025-09-13 05:40:19 -07:00
MAIL_HOST: postfix
MAIL_PORT: 25
2025-11-20 02:02:19 -08:00
DB_HOST: cmc-stg-db
2025-07-29 05:12:04 -07:00
DB_PORT: 3306
DB_USER: cmc
DB_PASSWORD: xVRQI&cA?7AU=hqJ!%au
DB_NAME: cmc
GO_APP_HOST: cmc-stg-go:8082
2025-07-23 03:00:06 -07:00
volumes:
2025-11-19 05:33:18 -08:00
- /home/cmc/files/pdf:/var/www/cmc-sales/app/webroot/pdf
- /home/cmc/files/attachments_files:/var/www/cmc-sales/app/webroot/attachments_files
2025-11-20 02:32:52 -08:00
- /home/cmc/files/emails:/var/www/emails
2025-11-19 05:33:18 -08:00
- /home/cmc/files/vault:/var/www/vault
- /home/cmc/files/vaultmsgs:/var/www/vaultmsgs
- ./userpasswd:/etc/nginx/userpasswd:ro
2025-07-23 03:00:06 -07:00
networks:
- cmc-stg-network
restart: unless-stopped
2025-08-10 05:35:26 -07:00
depends_on:
2025-11-20 02:02:19 -08:00
- cmc-stg-db
2025-07-23 03:00:06 -07:00
cmc-stg-go:
build:
context: .
dockerfile: Dockerfile.stg.go
2025-07-23 03:00:06 -07:00
container_name: cmc-stg-go
environment:
2025-11-20 02:02:19 -08:00
DB_HOST: cmc-stg-db
2025-07-23 03:00:06 -07:00
DB_PORT: 3306
DB_USER: cmc
DB_PASSWORD: xVRQI&cA?7AU=hqJ!%au
DB_NAME: cmc
2025-07-23 05:50:12 -07:00
PORT: 8082
2025-09-13 05:40:19 -07:00
SMTP_HOST: postfix
SMTP_PORT: 25
2025-08-10 23:52:30 -07:00
SMTP_USER: ""
SMTP_PASS: ""
2025-08-11 00:00:59 -07:00
SMTP_FROM: "sales@cmctechnologies.com.au"
2025-07-23 03:00:06 -07:00
ports:
2025-07-23 05:50:12 -07:00
- "8082:8082"
2025-07-23 03:00:06 -07:00
volumes:
2025-11-19 05:33:18 -08:00
- /home/cmc/files/pdf:/root/webroot/pdf:ro
2025-12-08 02:31:11 -08:00
- /home/cmc/files/attachments_files:/root/webroot/attachments_files
2025-07-23 03:00:06 -07:00
networks:
- cmc-stg-network
restart: unless-stopped
2025-08-10 05:35:26 -07:00
depends_on:
2025-11-20 02:02:19 -08:00
- cmc-stg-db
2025-07-23 03:00:06 -07:00
2025-11-20 02:02:19 -08:00
cmc-stg-db:
2025-08-10 05:35:26 -07:00
build:
context: .
dockerfile: Dockerfile.stg.db
2025-11-20 02:02:19 -08:00
container_name: cmc-stg-db
2025-08-09 19:15:28 -07:00
environment:
MYSQL_ROOT_PASSWORD: secureRootPassword
MYSQL_DATABASE: cmc
MYSQL_USER: cmc
MYSQL_PASSWORD: xVRQI&cA?7AU=hqJ!%au
volumes:
- db_data:/var/lib/mysql
ports:
2025-11-19 05:40:23 -08:00
- "3308:3306"
2025-08-09 19:15:28 -07:00
networks:
- cmc-stg-network
2025-07-23 03:00:06 -07:00
mailpit:
image: axllent/mailpit:latest
container_name: mailpit
ports:
- "8025:8025" # Mailpit web UI
- "1025:1025" # SMTP
networks:
- cmc-stg-network
2025-09-17 04:09:44 -07:00
- cmc-sales-prod_cmc-prod-network
2025-07-23 03:00:06 -07:00
restart: unless-stopped
2025-09-17 04:09:44 -07:00
2025-07-23 03:00:06 -07:00
networks:
cmc-stg-network:
2025-08-09 19:15:28 -07:00
2025-09-17 04:09:44 -07:00
cmc-sales-prod_cmc-prod-network:
external: true
2025-08-09 19:15:28 -07:00
volumes:
db_data: