-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
84 lines (74 loc) · 2.05 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
84 lines (74 loc) · 2.05 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
# docker-compose.prod.yml -- VPS production-like override
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.production up -d --build
services:
postgres:
ports: !reset []
restart: unless-stopped
redis:
ports: !reset []
restart: unless-stopped
minio:
ports: !reset []
restart: unless-stopped
mosquitto:
ports: !reset []
restart: unless-stopped
ai-serving:
ports: !reset []
expose:
- "8001"
restart: unless-stopped
decision-engine:
ports: !reset []
expose:
- "8002"
restart: unless-stopped
ingestion-service:
ports: !reset []
expose:
- "8003"
restart: unless-stopped
api-gateway:
ports: !reset []
expose:
- "8000"
restart: unless-stopped
frontend:
ports: !reset []
expose:
- "80"
build:
context: .
dockerfile: frontend/Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/v1}
VITE_WS_URL: ${VITE_WS_URL:-/ws/updates}
restart: unless-stopped
nginx:
image: nginx:1.27-alpine
depends_on:
frontend:
condition: service_healthy
api-gateway:
condition: service_healthy
environment:
DOMAIN: ${DOMAIN:?Set DOMAIN in .env.production}
command: >
/bin/sh -c "envsubst '$$DOMAIN' < /etc/nginx/nginx.conf > /tmp/nginx.conf &&
nginx -t -c /tmp/nginx.conf &&
exec nginx -g 'daemon off;' -c /tmp/nginx.conf"
ports:
- "${NGINX_HTTP_PORT:-80}:80"
- "${NGINX_HTTPS_PORT:-443}:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./certbot/conf:/etc/letsencrypt:ro
- ./certbot/www:/var/www/certbot:ro
healthcheck:
test: ["CMD-SHELL", "test -f /etc/letsencrypt/live/$DOMAIN/fullchain.pem && test -f /etc/letsencrypt/live/$DOMAIN/privkey.pem && nginx -t -c /tmp/nginx.conf && wget --spider -q --no-check-certificate https://localhost/healthz || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped