85 lines
2.1 KiB
YAML
85 lines
2.1 KiB
YAML
services:
|
|
clube67-db:
|
|
image: mysql:8.0
|
|
container_name: clube67-db-prod
|
|
restart: always
|
|
environment:
|
|
MYSQL_DATABASE: sis_cb67
|
|
MYSQL_USER: sis_cb67
|
|
MYSQL_PASSWORD: FsBtLbEStZ3AfBHC
|
|
MYSQL_ROOT_PASSWORD: root_cb67_secret_pass_2026
|
|
volumes:
|
|
- clube67-db-data:/var/lib/mysql
|
|
networks:
|
|
- soc
|
|
- web
|
|
|
|
clube67-backend:
|
|
image: node:20-alpine
|
|
container_name: clube67-backend-prod
|
|
restart: always
|
|
working_dir: /app/backend
|
|
env_file:
|
|
- ".env"
|
|
volumes:
|
|
- ".:/app"
|
|
- "./uploads:/www/wwwroot/clube67.com/uploads"
|
|
- "./logs:/www/wwwroot/clube67.com/logs"
|
|
command: sh -c "npm install --include=dev && npm run build && npm run migrate && npm run seed && npm run start"
|
|
depends_on:
|
|
- clube67-db
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
networks:
|
|
- soc
|
|
- web
|
|
|
|
clube67-frontend:
|
|
image: node:20-alpine
|
|
container_name: clube67-frontend-prod
|
|
restart: always
|
|
working_dir: /app/frontend
|
|
env_file:
|
|
- ".env"
|
|
volumes:
|
|
- ".:/app"
|
|
command: sh -c "npm install --include=dev && npm run build && npm run start"
|
|
depends_on:
|
|
- clube67-backend
|
|
networks:
|
|
- soc
|
|
- web
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: clube67-nginx-prod
|
|
restart: always
|
|
ports:
|
|
- "8085:80"
|
|
volumes:
|
|
- "./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro"
|
|
- "./uploads:/www/wwwroot/clube67.com/uploads:ro"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
# Roteador de Produção do Clube67 (Apenas clube67.com e www.clube67.com)
|
|
- "traefik.http.routers.clube67-prod.rule=Host(`clube67.com`) || Host(`www.clube67.com`)"
|
|
- "traefik.http.routers.clube67-prod.entrypoints=websecure"
|
|
- "traefik.http.routers.clube67-prod.tls.certresolver=le"
|
|
- "traefik.http.services.clube67-prod.loadbalancer.server.port=80"
|
|
- "traefik.docker.network=web"
|
|
networks:
|
|
- soc
|
|
- web
|
|
depends_on:
|
|
- clube67-frontend
|
|
- clube67-backend
|
|
|
|
volumes:
|
|
clube67-db-data:
|
|
|
|
networks:
|
|
soc:
|
|
external: true
|
|
web:
|
|
external: true
|