-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yaml
More file actions
74 lines (71 loc) · 2.09 KB
/
Copy pathdocker-compose.prod.yaml
File metadata and controls
74 lines (71 loc) · 2.09 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
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
restart: unless-stopped
environment:
ENVIRONMENT: production
GROQ_API_KEY: ${GROQ_API_KEY:?GROQ_API_KEY is required}
# Database — Supabase (full connection string overrides individual fields)
DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required}
DB_USER: postgres
DB_PASSWORD: ${DB_PASSWORD}
# Redis — Upstash (REST URL + token)
UPSTASH_REDIS_REST_URL: ${UPSTASH_REDIS_REST_URL}
UPSTASH_REDIS_REST_TOKEN: ${UPSTASH_REDIS_REST_TOKEN}
# R2 / S3-compatible storage
R2_ACCOUNT_ID: ${R2_ACCOUNT_ID}
R2_ACCESS_KEY: ${R2_ACCESS_KEY}
R2_SECRET_KEY: ${R2_SECRET_KEY}
R2_BUCKET: ${R2_BUCKET:-datalens}
# App config
MAX_UPLOAD_MB: ${MAX_UPLOAD_MB:-100}
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
CORS_ORIGINS: ${CORS_ORIGINS:-https://datalens.example.com}
JWT_SECRET_KEY: ${JWT_SECRET_KEY:?JWT_SECRET_KEY is required}
JWT_EXPIRE_MINUTES: ${JWT_EXPIRE_MINUTES:-1440}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
restart: unless-stopped
environment:
NODE_ENV: production
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://backend:8000}
NEXT_PUBLIC_WS_URL: ${NEXT_PUBLIC_WS_URL:-ws://backend:8000}
depends_on:
- backend
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
nginx:
image: nginx:1.27-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- certbot_data:/var/www/certbot
depends_on:
- frontend
- backend
profiles:
- full
volumes:
certbot_data: