This repository was archived by the owner on Jul 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (89 loc) · 2.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (89 loc) · 2.21 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
85
86
87
88
89
90
91
92
93
services:
app:
build: .
restart: unless-stopped
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
env_file:
- ${ENV_FILE:-.env}
ports:
- "${BIND_ADDRESS:-127.0.0.1}:${APP_PORT:-3000}:3000"
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
migrate:
build:
context: .
target: migrate
restart: "no"
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
env_file:
- ${ENV_FILE:-.env}
depends_on:
postgres:
condition: service_healthy
logging: *default-logging
worker:
build:
context: .
target: worker
restart: unless-stopped
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
env_file:
- ${ENV_FILE:-.env}
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD-SHELL", "node -e \"require('fs').stat('/tmp/bufferdash-worker-heartbeat',(e,s)=>process.exit(!e&&Date.now()-s.mtimeMs<120000?0:1))\""]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
logging: *default-logging
postgres:
image: postgres:16
pull_policy: always
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-bufferdash}
POSTGRES_USER: ${POSTGRES_USER:-bufferdash}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-bufferdash_password}
volumes:
- postgres_data:/var/lib/postgresql/data
shm_size: 128mb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
logging: *default-logging
volumes:
postgres_data: