94 lines
2.4 KiB
YAML
94 lines
2.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
todo-backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
image: todolist-backend:latest
|
|
container_name: todo-backend-prod
|
|
ports:
|
|
- "12011:12011"
|
|
environment:
|
|
# MySQL Database Configuration
|
|
- DATABASE_URL=mysql+pymysql://A060:WLeSCi0yhtc7@mysql.theaken.com:33306/db_A060
|
|
- MYSQL_HOST=mysql.theaken.com
|
|
- MYSQL_PORT=33306
|
|
- MYSQL_USER=A060
|
|
- MYSQL_PASSWORD=WLeSCi0yhtc7
|
|
- MYSQL_DATABASE=db_A060
|
|
- MYSQL_CHARSET=utf8mb4
|
|
|
|
# CORS Configuration
|
|
- CORS_ORIGINS=http://localhost:12012
|
|
|
|
# LDAP Configuration (Production)
|
|
- USE_MOCK_LDAP=false
|
|
- LDAP_SERVER=panjit.com.tw
|
|
- LDAP_PORT=389
|
|
- LDAP_USE_SSL=false
|
|
- LDAP_BIND_USER_DN=CN=LdapBind,CN=Users,DC=PANJIT,DC=COM,DC=TW
|
|
- LDAP_BIND_USER_PASSWORD=panjit2481
|
|
- LDAP_SEARCH_BASE=OU=PANJIT,DC=panjit,DC=com,DC=tw
|
|
- LDAP_USER_LOGIN_ATTR=userPrincipalName
|
|
|
|
# SMTP Configuration
|
|
- SMTP_SERVER=mail.panjit.com.tw
|
|
- SMTP_PORT=25
|
|
- SMTP_USE_TLS=false
|
|
- SMTP_USE_SSL=false
|
|
- SMTP_AUTH_REQUIRED=false
|
|
- SMTP_SENDER_EMAIL=todo-system@panjit.com.tw
|
|
- SMTP_SENDER_PASSWORD=
|
|
|
|
# Flask Configuration
|
|
- FLASK_ENV=production
|
|
- SECRET_KEY=your-production-secret-key-change-me
|
|
- JWT_SECRET_KEY=your-jwt-secret-key-change-me
|
|
|
|
# Logging
|
|
- LOG_LEVEL=INFO
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:12011/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
networks:
|
|
- todolist-network
|
|
|
|
todo-frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- NEXT_PUBLIC_API_URL=http://localhost:12011
|
|
image: todo-frontend:latest
|
|
container_name: todo-frontend-prod
|
|
ports:
|
|
- "12012:12012"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_PUBLIC_API_URL=http://localhost:12011
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:12012"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
networks:
|
|
- todolist-network
|
|
depends_on:
|
|
- todo-backend
|
|
|
|
networks:
|
|
todolist-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
backend-logs:
|
|
driver: local
|
|
frontend-logs:
|
|
driver: local |