-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (44 loc) · 1.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
47 lines (44 loc) · 1.14 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
name: adb-prod
services:
mongo:
image: mongo:7
container_name: adb-prod-mongo
restart: unless-stopped
environment:
# Read from .env — keep in sync with MONGODB_URI
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
ports:
- "27018:27017"
volumes:
- mongo-prod-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand({ ping: 1 })"]
interval: 10s
timeout: 5s
retries: 5
bot:
build:
context: .
dockerfile: Dockerfile
args:
NODE_ENV: production
container_name: adb-prod-bot
restart: unless-stopped
ports:
- "3000:3000"
depends_on:
mongo:
condition: service_healthy
env_file:
- ./.env
working_dir: /app
volumes:
# Dashboard-installed plugin manifest + registry cache + submissions.
# Without this, every rebuild loses npm-installed plugins and anything
# else the running container wrote under data/.
- bot-data:/app/data
command: ["npm", "start"]
volumes:
mongo-prod-data:
bot-data: