-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (65 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
70 lines (65 loc) · 1.78 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
version: "3.8"
services:
# API Service
api:
container_name: node-temporal-postgres-api
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile.api
target: production
env_file: .env
environment:
- NODE_ENV=${NODE_ENV:-production}
- PORT=${PORT:-3015}
volumes:
- '${LOG_VOLUME:-./logs}:/usr/src/app/logs'
ports:
- '${PORT:-3015}:${PORT:-3015}'
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:${PORT:-3015}/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Temporal Worker Service
worker:
container_name: node-temporal-postgres-worker
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile.worker
target: production
env_file: .env
environment:
- NODE_ENV=${NODE_ENV:-production}
volumes:
- '${LOG_VOLUME:-./logs}:/usr/src/app/logs'
# Workers don't expose ports - they poll Temporal Server
# No healthcheck needed - Temporal Server monitors worker health
# Nginx reverse proxy
nginx:
image: nginx:1.27-alpine
container_name: node-temporal-postgres-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.sample.conf:/etc/nginx/conf.d/default.conf:ro
- ./proxy_params.conf:/etc/nginx/conf.d/proxy_params.conf:ro
- nginx_logs:/var/log/nginx
depends_on:
- api
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
nginx_logs:
driver: local
networks:
default:
name: node-temporal-postgres-network
driver: bridge