-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
82 lines (78 loc) · 2.39 KB
/
Copy pathdocker-compose.production.yml
File metadata and controls
82 lines (78 loc) · 2.39 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
# Production Docker Compose Configuration
# Usage: docker compose -f docker-compose.production.yml up -d
#
# Required environment variables (set via .env or export):
# POSTGRES_PASSWORD - Strong random password for PostgreSQL
# CRYPTOSERVE_MASTER_KEY - 32+ char encryption master key
# JWT_SECRET_KEY - 32+ char JWT signing secret
# OAUTH_STATE_SECRET - Random secret for OAuth CSRF protection
# HKDF_SALT - Unique salt for key derivation
# GITHUB_CLIENT_ID - GitHub OAuth app client ID
# GITHUB_CLIENT_SECRET - GitHub OAuth app client secret
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: cryptoserve
POSTGRES_USER: cryptoserve
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cryptoserve"]
interval: 5s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 512M
restart: unless-stopped
backend:
image: ghcr.io/ecolibria/crypto-serve-backend:latest
ports:
- "8003:8003"
environment:
DATABASE_URL: postgresql+asyncpg://cryptoserve:${POSTGRES_PASSWORD}@postgres:5432/cryptoserve
CRYPTOSERVE_MASTER_KEY: ${CRYPTOSERVE_MASTER_KEY}
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
OAUTH_STATE_SECRET: ${OAUTH_STATE_SECRET}
HKDF_SALT: ${HKDF_SALT}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
FRONTEND_URL: ${FRONTEND_URL:-https://localhost:3003}
BACKEND_URL: ${BACKEND_URL:-https://localhost:8003}
ENVIRONMENT: "production"
DEV_MODE: "false"
STARTUP_VALIDATION_LEVEL: "strict"
COOKIE_SECURE: "true"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
deploy:
resources:
limits:
memory: 512M
restart: unless-stopped
frontend:
image: ghcr.io/ecolibria/crypto-serve-frontend:latest
ports:
- "3003:3000"
environment:
NEXT_PUBLIC_API_URL: ${BACKEND_URL:-https://localhost:8003}
API_URL: http://backend:8003
depends_on:
- backend
deploy:
resources:
limits:
memory: 256M
restart: unless-stopped
volumes:
postgres_data: