-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
73 lines (68 loc) · 2.46 KB
/
Copy pathdocker-compose.production.yml
File metadata and controls
73 lines (68 loc) · 2.46 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
# Production overrides for docker-compose
# Usage: docker-compose -f docker-compose.yml -f docker-compose.production.yml up -d
services:
# Update build args for production URLs
migrate:
build:
args:
BASE_URL: "https://designer.tesslate.com"
NEXT_PUBLIC_BASE_URL: "https://designer.tesslate.com"
POSTGRES_URL: ${POSTGRES_URL}
STRIPE_PLUS_PRICE_ID: ${STRIPE_PLUS_PRICE_ID}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
STRIPE_PRO_PRICE_ID: ${STRIPE_PRO_PRICE_ID}
environment:
POSTGRES_URL: ${POSTGRES_URL}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
# Remove port exposure for security (nginx will proxy)
litellm-proxy:
ports: []
environment:
# Ensure it listens on all interfaces for Docker networking
HOST: "0.0.0.0"
# Override DATABASE_URL with production credentials
DATABASE_URL: ${DATABASE_URL}
# Update Next.js for production
nextjs-app:
build:
args:
BASE_URL: "https://designer.tesslate.com"
NEXT_PUBLIC_BASE_URL: "https://designer.tesslate.com"
POSTGRES_URL: ${POSTGRES_URL}
STRIPE_PLUS_PRICE_ID: ${STRIPE_PLUS_PRICE_ID}
STRIPE_PRO_PRICE_ID: ${STRIPE_PRO_PRICE_ID}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
ports: [] # Remove external port exposure
environment:
NODE_ENV: "production"
# Database connection
POSTGRES_URL: ${POSTGRES_URL}
# Internal URLs for Docker networking
LITELLM_PROXY_URL: "http://litellm-proxy:4000"
# Production URLs for external access
BASE_URL: "https://designer.tesslate.com"
NEXT_PUBLIC_BASE_URL: "https://designer.tesslate.com"
# Stripe configuration
STRIPE_PLUS_PRICE_ID: ${STRIPE_PLUS_PRICE_ID}
STRIPE_PRO_PRICE_ID: ${STRIPE_PRO_PRICE_ID}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
# Add health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Production database configurations
postgres-app:
ports: [] # Remove external port exposure
environment:
POSTGRES_DB: app_db
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
postgres-litellm:
ports: [] # Remove external port exposure
environment:
POSTGRES_DB: litellm_db
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}