-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (32 loc) · 868 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (32 loc) · 868 Bytes
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
version: '3.9'
services:
database:
container_name: technobot-mongodb
image: mongo
restart: on-failure
environment:
- MONGO_INITDB_ROOT_USERNAME
- MONGO_INITDB_ROOT_PASSWORD
- MONGO_USER
- MONGO_PASSWORD
- MONGO_DATABASE
healthcheck:
test: [ "CMD-SHELL", "mongosh ${MONGO_DATABASE} -u ${MONGO_USER} -p ${MONGO_PASSWORD} --authenticationDatabase admin --eval 'db'" ]
interval: 10s
timeout: 10s
retries: 30
volumes:
- ./database_init.sh:/docker-entrypoint-initdb.d/database_init.sh
- mongodata:/data
discord-bot:
container_name: technobot
build: ./
restart: on-failure
depends_on:
database:
condition: service_healthy
environment:
- TOKEN
- DATABASE=mongodb://$MONGO_USER:$MONGO_PASSWORD@technobot-mongodb
volumes:
mongodata: