version: '3.8' services: cmc-php-staging: build: context: . dockerfile: Dockerfile platform: linux/amd64 container_name: cmc-php-staging depends_on: - db-staging ports: - "127.0.0.1:8091:80" # Only accessible from localhost volumes: - staging_pdf_data:/var/www/cmc-sales/app/webroot/pdf - staging_attachments_data:/var/www/cmc-sales/app/webroot/attachments_files restart: unless-stopped environment: - APP_ENV=staging 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 restart: unless-stopped ports: - "127.0.0.1:3307:3306" # Only accessible from localhost 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: - "127.0.0.1:8092:8080" # Only accessible from localhost 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: