-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
113 lines (108 loc) · 3.67 KB
/
Copy pathcompose.yaml
File metadata and controls
113 lines (108 loc) · 3.67 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: draftledger
services:
db:
image: postgres:17-alpine
environment:
POSTGRES_USER: draftledger
POSTGRES_PASSWORD: draftledger
POSTGRES_DB: draftledger
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U draftledger -d draftledger"]
interval: 5s
timeout: 5s
retries: 20
ports:
- "5432:5432"
migrate:
build:
context: .
command: ["node", "--experimental-strip-types", "scripts/migrate-and-seed.ts"]
environment:
DATABASE_URL: postgresql://draftledger:draftledger@db:5432/draftledger
ARTIFACT_DIR: /data/artifacts
SEED_ON_BOOT: "true"
volumes:
- artifacts:/data/artifacts
depends_on:
db:
condition: service_healthy
restart: "no"
web:
build:
context: .
command: ["node", "server.js"]
environment:
APP_BASE_URL: http://localhost:3000
# Left empty on purpose. These three are editable from Admin > Settings,
# and the app treats an empty variable as absent so the stored value is
# used. Give one a value here and it becomes authoritative: the admin
# screen then shows that field as managed by the environment rather than
# accepting an edit the reader would never see.
APP_BRAND_NAME: ${APP_BRAND_NAME:-}
APP_ORG_NAME: ${APP_ORG_NAME:-}
BUG_REPORT_URL: ${BUG_REPORT_URL:-}
DOCUMENT_NAMESPACE: ${DOCUMENT_NAMESPACE:-ORG-RFC}
DATABASE_URL: postgresql://draftledger:draftledger@db:5432/draftledger
ARTIFACT_STORAGE: local
ARTIFACT_DIR: /data/artifacts
SESSION_SECRET: ${SESSION_SECRET:-dev-only-session-secret-change-me-0000000000}
ADMIN_SYNC_TOKEN: ${ADMIN_SYNC_TOKEN:-dev-only-sync-token}
EXTERNAL_IMPORT_ENABLED: ${EXTERNAL_IMPORT_ENABLED:-false}
SYNC_MODE: ${SYNC_MODE:-disabled}
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-587}
SMTP_SECURE: ${SMTP_SECURE:-false}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
SMTP_FROM: ${SMTP_FROM:-}
HOSTNAME: 0.0.0.0
PORT: "3000"
ports:
- "3000:3000"
volumes:
- artifacts:/data/artifacts
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3000/health/ready').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 12
worker:
build:
context: .
command: ["node", "--experimental-strip-types", "src/jobs/worker-entry.ts"]
environment:
APP_BASE_URL: http://web:3000
# Must match the web service, otherwise notification mail would be
# branded differently from the application that sent it.
APP_BRAND_NAME: ${APP_BRAND_NAME:-}
DOCUMENT_NAMESPACE: ${DOCUMENT_NAMESPACE:-ORG-RFC}
DATABASE_URL: postgresql://draftledger:draftledger@db:5432/draftledger
ARTIFACT_STORAGE: local
ARTIFACT_DIR: /data/artifacts
SESSION_SECRET: ${SESSION_SECRET:-dev-only-session-secret-change-me-0000000000}
EXTERNAL_IMPORT_ENABLED: ${EXTERNAL_IMPORT_ENABLED:-false}
SYNC_MODE: ${SYNC_MODE:-disabled}
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-587}
SMTP_SECURE: ${SMTP_SECURE:-false}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
SMTP_FROM: ${SMTP_FROM:-}
WORKER_CONCURRENCY: "2"
volumes:
- artifacts:/data/artifacts
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
volumes:
db-data:
artifacts: