127 lines
3.1 KiB
YAML
127 lines
3.1 KiB
YAML
services:
|
|
postfix:
|
|
image: boky/postfix
|
|
restart: unless-stopped
|
|
container_name: cmc-stg-postfix
|
|
# Staging: relay to Mailpit (no authentication required)
|
|
environment:
|
|
- RELAYHOST=mailpit:1025
|
|
- ALLOWED_SENDER_DOMAINS=cmctechnologies.com.au
|
|
# --- 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
|
|
networks:
|
|
- cmc-stg-network
|
|
nginx:
|
|
image: nginx:latest
|
|
container_name: cmc-stg-nginx
|
|
hostname: nginx-stg
|
|
ports:
|
|
- "8081:80" # Staging nginx on different port
|
|
volumes:
|
|
- ./conf/nginx-site.stg.conf:/etc/nginx/conf.d/cmc.conf
|
|
- ./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
|
|
container_name: cmc-stg-php
|
|
environment:
|
|
MAIL_HOST: postfix
|
|
MAIL_PORT: 25
|
|
DB_HOST: cmc-stg-db
|
|
DB_PORT: 3306
|
|
DB_USER: cmc
|
|
DB_PASSWORD: xVRQI&cA?7AU=hqJ!%au
|
|
DB_NAME: cmc
|
|
GO_APP_HOST: cmc-stg-go:8082
|
|
volumes:
|
|
- /home/cmc/files/pdf:/var/www/cmc-sales/app/webroot/pdf
|
|
- /home/cmc/files/attachments_files:/var/www/cmc-sales/app/webroot/attachments_files
|
|
- /home/cmc/files/emails:/var/www/emails
|
|
- /home/cmc/files/vault:/var/www/vault
|
|
- /home/cmc/files/vaultmsgs:/var/www/vaultmsgs
|
|
- ./userpasswd:/etc/nginx/userpasswd:ro
|
|
networks:
|
|
- cmc-stg-network
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- cmc-stg-db
|
|
|
|
cmc-stg-go:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.stg.go
|
|
container_name: cmc-stg-go
|
|
environment:
|
|
DB_HOST: cmc-stg-db
|
|
DB_PORT: 3306
|
|
DB_USER: cmc
|
|
DB_PASSWORD: xVRQI&cA?7AU=hqJ!%au
|
|
DB_NAME: cmc
|
|
PORT: 8082
|
|
SMTP_HOST: postfix
|
|
SMTP_PORT: 25
|
|
SMTP_USER: ""
|
|
SMTP_PASS: ""
|
|
SMTP_FROM: "sales@cmctechnologies.com.au"
|
|
ports:
|
|
- "8082:8082"
|
|
volumes:
|
|
- /home/cmc/files/pdf:/root/webroot/pdf:ro
|
|
- /home/cmc/files/attachments_files:/root/webroot/attachments_files
|
|
networks:
|
|
- cmc-stg-network
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- cmc-stg-db
|
|
|
|
cmc-stg-db:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.stg.db
|
|
container_name: cmc-stg-db
|
|
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:
|
|
- "3308:3306"
|
|
networks:
|
|
- cmc-stg-network
|
|
|
|
mailpit:
|
|
image: axllent/mailpit:latest
|
|
container_name: mailpit
|
|
ports:
|
|
- "8025:8025" # Mailpit web UI
|
|
- "1025:1025" # SMTP
|
|
networks:
|
|
- cmc-stg-network
|
|
- cmc-sales-prod_cmc-prod-network
|
|
restart: unless-stopped
|
|
|
|
|
|
networks:
|
|
cmc-stg-network:
|
|
|
|
cmc-sales-prod_cmc-prod-network:
|
|
external: true
|
|
|
|
volumes:
|
|
db_data:
|