-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.48 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
version: '3.8'
services:
# Backend API
backend:
build:
context: .
dockerfile: Dockerfile
container_name: math-phoenix-backend
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- OPENAI_API_KEY=${OPENAI_API_KEY}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_REGION=${AWS_REGION}
- SESSION_SECRET=${SESSION_SECRET}
- DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD}
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
- DYNAMODB_TABLE_NAME=${DYNAMODB_TABLE_NAME}
- DYNAMODB_ML_TABLE_NAME=${DYNAMODB_ML_TABLE_NAME}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:5173}
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
- math-phoenix-network
# Frontend (for local development/testing)
frontend:
image: node:18-alpine
container_name: math-phoenix-frontend
working_dir: /app
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5173:5173"
environment:
- VITE_API_URL=http://localhost:3001
command: sh -c "npm install && npm run dev -- --host"
depends_on:
- backend
networks:
- math-phoenix-network
networks:
math-phoenix-network:
driver: bridge