-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
85 lines (85 loc) · 2.07 KB
/
docker-compose.yaml
File metadata and controls
85 lines (85 loc) · 2.07 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
name: databank
volumes:
caddy_data:
mongo_config:
mongo_data:
services:
caddy:
image: caddy:2.7-alpine
restart: unless-stopped
ports:
- ${APP_PORT}:80
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
api:
image: ghcr.io/douglasneuroinformatics/databank-api:${RELEASE_CHANNEL}
restart: unless-stopped
build:
context: .
dockerfile: ./api/Dockerfile
depends_on:
- mongo
- valkey
volumes:
- ./uploads:/app/uploads
environment:
- NODE_ENV=production
- UPLOADS_DIR=/app/uploads
- MONGO_URI=mongodb://mongo:27017
- MONGO_REPLICA_SET=rs0
- MONGO_RETRY_WRITES=true
- MONGO_WRITE_CONCERN=majority
- MONGO_DIRECT_CONNECTION=true
- MONGO_PORT
- MONGO_VERSION
- VALKEY_PORT
- VALKEY_VERSION
- VALKEY_HOST
- SMTP_HOST
- SMTP_PORT
- SMTP_AUTH_USERNAME
- SMTP_AUTH_PASSWORD
- SMTP_SENDER
- SMTP_SECURE
- SECRET_KEY
- VALIDATION_TIMEOUT
- MAX_VALIDATION_ATTEMPTS
expose:
- 80
web:
image: ghcr.io/douglasneuroinformatics/databank-web:${RELEASE_CHANNEL}
restart: unless-stopped
build:
context: .
dockerfile: ./web/Dockerfile
expose:
- 80
mongo:
image: mongo:${MONGO_VERSION}
command: ['--replSet', 'rs0', '--bind_ip_all', '--port', '27017']
expose:
- ${MONGO_PORT}
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
valkey:
image: valkey/valkey:${VALKEY_VERSION}
container_name: valkey
healthcheck:
test: ['CMD', 'valkey-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
ports:
- ${VALKEY_PORT}:${VALKEY_PORT}
volumes:
- ./valkey-data:/valkey-data