-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (85 loc) · 2.23 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (85 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3.8'
services:
# SQL Server Database
# IMPORTANT: For production, use Docker secrets or environment variables
# to manage the SA_PASSWORD instead of hardcoding it here
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: economic-storm-sqlserver
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=${DB_PASSWORD:-EconomicStorm2024!}
- MSSQL_PID=Express
ports:
- "1433:1433"
volumes:
- sqlserver-data:/var/opt/mssql
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P EconomicStorm2024! -Q 'SELECT 1'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
networks:
- app-network
restart: unless-stopped
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: economic-storm-backend
ports:
- "5000:5000"
environment:
- NODE_ENV=production
- PORT=5000
- DB_SERVER=sqlserver
- DB_PORT=1433
- DB_DATABASE=EconomicStorm
- DB_USER=sa
- DB_PASSWORD=${DB_PASSWORD:-EconomicStorm2024!}
- DB_ENCRYPT=true
- DB_TRUST_SERVER_CERTIFICATE=true
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost:3000}
- GEMINI_API_KEY=${GEMINI_API_KEY}
depends_on:
sqlserver:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5000/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 40s
networks:
- app-network
restart: unless-stopped
# Frontend Web Application
web:
build:
context: .
dockerfile: Dockerfile
container_name: economic-storm-platform
ports:
- "3000:80"
environment:
- NODE_ENV=production
- REACT_APP_API_URL=http://localhost:5000/api/v1
depends_on:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 40s
networks:
- app-network
volumes:
sqlserver-data:
driver: local
networks:
app-network:
driver: bridge