cmc-sales/docker-compose.yml

102 lines
2.2 KiB
YAML
Raw Permalink Normal View History

2025-04-04 02:42:51 -07:00
services:
nginx:
image: nginx:latest
2025-04-07 00:49:00 -07:00
hostname: nginx
2025-04-04 02:42:51 -07:00
ports:
2025-06-24 03:32:28 -07:00
- "80:80" # CakePHP app (cmclocal)
2025-04-07 00:49:00 -07:00
volumes:
2025-04-07 14:57:39 -07:00
- ./conf/nginx-site.conf:/etc/nginx/conf.d/cmc.conf
2025-04-07 00:49:00 -07:00
- ./userpasswd:/etc/nginx/userpasswd:ro
2025-06-24 03:32:28 -07:00
depends_on:
- cmc-php
2025-06-22 15:19:11 -07:00
restart: unless-stopped
2025-04-04 02:42:51 -07:00
networks:
- cmc-network
2025-06-24 03:32:28 -07:00
cmc-php:
2025-06-22 15:19:11 -07:00
build:
context: .
dockerfile: Dockerfile
2025-04-04 02:42:51 -07:00
platform: linux/amd64
2025-06-24 03:32:28 -07:00
container_name: cmc-php
2025-04-04 02:42:51 -07:00
depends_on:
- db
volumes:
- ./app/webroot/pdf:/var/www/cmc-sales/app/webroot/pdf
- ./app/webroot/attachments_files:/var/www/cmc-sales/app/webroot/attachments_files
networks:
- cmc-network
2025-06-24 03:32:28 -07:00
restart: unless-stopped
2025-06-22 15:19:11 -07:00
develop:
watch:
- action: rebuild
path: ./app
ignore:
2025-07-02 05:04:36 -07:00
- ./app/webroot/pdf
- ./app/webroot/attachments_files
- ./app/tmp
- action: sync
path: ./app/webroot/css
target: /var/www/cmc-sales/app/webroot/css
- action: sync
path: ./app/webroot/js
target: /var/www/cmc-sales/app/webroot/js
2025-06-22 15:19:11 -07:00
2025-04-04 02:42:51 -07:00
db:
image: mariadb:latest
container_name: cmc-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:
- "3306:3306"
networks:
- cmc-network
2025-06-24 03:32:28 -07:00
cmc-go:
build:
context: .
dockerfile: Dockerfile.go
container_name: cmc-go
environment:
DB_HOST: db
DB_PORT: 3306
DB_USER: cmc
DB_PASSWORD: xVRQI&cA?7AU=hqJ!%au
DB_NAME: cmc
PORT: 8080
depends_on:
db:
condition: service_started
ports:
- "8080:8080"
2025-07-02 05:04:36 -07:00
volumes:
- ./app/webroot/pdf:/root/webroot/pdf
2025-06-24 03:32:28 -07:00
networks:
- cmc-network
restart: unless-stopped
develop:
watch:
- action: rebuild
path: ./go-app
ignore:
- ./go-app/bin
- ./go-app/.env
2025-07-02 05:04:36 -07:00
- ./go-app/tmp
- "**/.*" # Ignore hidden files
- action: sync
path: ./go-app/templates
target: /app/templates
- action: sync
path: ./go-app/static
target: /app/static
2025-06-24 03:32:28 -07:00
2025-04-04 02:42:51 -07:00
volumes:
db_data:
networks:
cmc-network: