forked from DouglasNeuroInformatics/OpenDataCapture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
162 lines (162 loc) · 4.52 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
162 lines (162 loc) · 4.52 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: ${PROJECT_NAME:-open-data-capture}
volumes:
caddy_data:
services:
caddy:
image: caddy:2.7-alpine
restart: unless-stopped
ports:
- ${APP_PORT}:80
environment:
- SITE_ADDRESS
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
profiles:
- '' #load by default without having to specify docker compose --profile
- gateway
- fullstack
- nogateway
api:
image: ghcr.io/douglasneuroinformatics/open-data-capture-api:${RELEASE_CHANNEL}
build:
context: .
dockerfile: ./apps/api/Dockerfile
args:
- RELEASE_VERSION
depends_on:
- mongo
- rustfs
restart: unless-stopped
environment:
- GATEWAY_INTERNAL_NETWORK_URL=http://gateway:80
- MONGO_REPLICA_SET=rs0
- MONGO_RETRY_WRITES=true
- MONGO_WRITE_CONCERN=majority
- MONGO_DIRECT_CONNECTION=true
- MONGO_URI=mongodb://mongo:27017
- STORAGE_ENABLED
- STORAGE_ENDPOINT=http://rustfs:9000
- STORAGE_PUBLIC_ENDPOINT=${STORAGE_PUBLIC_ENDPOINT:-http://localhost:${APP_PORT}/storage}
- STORAGE_ACCESS_KEY
- STORAGE_SECRET_KEY
- STORAGE_BUCKET
- STORAGE_REGION
- NODE_ENV=production
- DANGEROUSLY_DISABLE_PBKDF2_ITERATION
- DEBUG
- GATEWAY_API_KEY
- GATEWAY_ENABLED
- GATEWAY_REFRESH_INTERVAL
- GATEWAY_SITE_ADDRESS
- SECRET_KEY
- THROTTLER_ENABLED
- LOGIN_REQUEST_THROTTLER_LIMIT
- LOGIN_REQUEST_THROTTLER_TTL
- VERBOSE
expose:
- 80
profiles:
- '' #load by default without having to specify docker compose --profile
- fullstack
- nogateway
gateway:
image: ghcr.io/douglasneuroinformatics/open-data-capture-gateway:${RELEASE_CHANNEL}
build:
args:
- RELEASE_VERSION
context: .
dockerfile: ./apps/gateway/Dockerfile
ports:
- ${GATEWAY_PORT}:80
expose:
- 80
profiles:
- '' #load by default without having to specify docker compose --profile
- gateway
- fullstack
restart: unless-stopped
environment:
- NODE_ENV=production
- GATEWAY_API_KEY
volumes:
- ./sqlite:/app/sqlite
web:
image: ghcr.io/douglasneuroinformatics/open-data-capture-web:${RELEASE_CHANNEL}
build:
args:
- RELEASE_VERSION
context: .
dockerfile: ./apps/web/Dockerfile
environment:
- API_BASE_URL=/api
- CONTACT_EMAIL
- DOCS_URL
- GITHUB_REPO_URL
- LICENSE_URL
- GATEWAY_ENABLED
- PLAUSIBLE_BASE_URL
- PLAUSIBLE_WEB_DATA_DOMAIN
expose:
- 80
profiles:
- '' #load by default without having to specify docker compose --profile
- fullstack
- nogateway
restart: unless-stopped
mongo:
image: mongo:${MONGODB_VERSION}
command: ['--replSet', 'rs0', '--bind_ip_all', '--port', '27017']
expose:
- 27017
restart: unless-stopped
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'localhost:27017'}]}) }" | mongosh --port 27017 --quiet
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30
volumes:
- ./mongo/config:/data/configdb
- ./mongo/data:/data/db
profiles:
- '' #load by default without having to specify docker compose --profile
- fullstack
- nogateway
rustfs:
image: rustfs/rustfs:${RUSTFS_VERSION:-latest}
restart: unless-stopped
environment:
- RUSTFS_VOLUMES=/data
- RUSTFS_ADDRESS=0.0.0.0:9000
# Fall back to placeholder credentials so the container still boots cleanly when
# storage is disabled (STORAGE_ENABLED=false) and no keys have been generated.
- RUSTFS_ACCESS_KEY=${STORAGE_ACCESS_KEY:-odc-storage}
- RUSTFS_SECRET_KEY=${STORAGE_SECRET_KEY:-odc-storage-secret}
- RUSTFS_CONSOLE_ENABLE=false
expose:
- 9000
volumes:
- ./rustfs/data:/data
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/health']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
profiles:
- '' #load by default without having to specify docker compose --profile
- fullstack
- nogateway
playground:
image: ghcr.io/douglasneuroinformatics/open-data-capture-playground:${RELEASE_CHANNEL}
build:
context: .
dockerfile: ./apps/playground/Dockerfile
ports:
- '3750:80'
restart: unless-stopped
profiles:
- fullstack
- playground