77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
cmc-php-staging:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.ubuntu-php
|
|
platform: linux/amd64
|
|
container_name: cmc-php-staging
|
|
depends_on:
|
|
- db-staging
|
|
ports:
|
|
- "127.0.0.1:8091:80"
|
|
volumes:
|
|
# Mount specific app directories while preserving cake core
|
|
- ./app/config:/var/www/cmc-sales/app/config
|
|
- ./app/controllers:/var/www/cmc-sales/app/controllers
|
|
- ./app/models:/var/www/cmc-sales/app/models
|
|
- ./app/views:/var/www/cmc-sales/app/views
|
|
- ./app/vendors:/var/www/cmc-sales/app/vendors
|
|
- ./app/webroot/css:/var/www/cmc-sales/app/webroot/css
|
|
- ./app/webroot/js:/var/www/cmc-sales/app/webroot/js
|
|
- ./app/webroot/img:/var/www/cmc-sales/app/webroot/img
|
|
- staging_pdf_data:/var/www/cmc-sales/app/webroot/pdf
|
|
- staging_attachments_data:/var/www/cmc-sales/app/webroot/attachments_files
|
|
# Mount cake directory to ensure CakePHP core is available
|
|
- ./cake:/var/www/cmc-sales/cake
|
|
- ./vendors:/var/www/cmc-sales/vendors
|
|
- ./index.php:/var/www/cmc-sales/index.php
|
|
restart: unless-stopped
|
|
environment:
|
|
- APP_ENV=staging
|
|
- DB_HOST=db-staging
|
|
- DB_NAME=cmc_staging
|
|
- DB_USER=cmc_staging
|
|
- DB_PASSWORD=${DB_PASSWORD_STAGING:-staging_password}
|
|
|
|
db-staging:
|
|
image: mariadb:10.11
|
|
container_name: cmc-db-staging
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD_STAGING:-root_password}
|
|
MYSQL_DATABASE: cmc_staging
|
|
MYSQL_USER: cmc_staging
|
|
MYSQL_PASSWORD: ${DB_PASSWORD_STAGING:-staging_password}
|
|
volumes:
|
|
- staging_db_data:/var/lib/mysql
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:3307:3306"
|
|
|
|
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:-staging_password}
|
|
DB_NAME: cmc_staging
|
|
PORT: 8080
|
|
APP_ENV: staging
|
|
depends_on:
|
|
- db-staging
|
|
ports:
|
|
- "127.0.0.1:8092:8080"
|
|
volumes:
|
|
- staging_pdf_data:/root/webroot/pdf
|
|
- ./credentials/staging:/root/credentials:ro
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
staging_db_data:
|
|
staging_pdf_data:
|
|
staging_attachments_data: |