-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
37 lines (36 loc) · 1.07 KB
/
docker-compose.yml
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
version: '3.9'
services:
mongo:
image: mongo
container_name: mongo
restart: always
hostname: mongodb
ports:
- 27017:27017
volumes:
- ./bot/mongo/data:/data/db
- ./bot/mongo/initdb.d:/docker-entrypoint-initdb.d
environment:
MONGO_INITDB_DATABASE: applications-bot
healthcheck:
test: ["CMD","mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 10s
retries: 3
start_period: 5s
bot:
depends_on:
mongo:
condition: service_healthy
build:
context: ./bot/
dockerfile: Dockerfile
container_name: applications-bot
stop_signal: SIGINT
restart: on-failure
volumes:
- ./bot/config:/app/applications-bot/bot/config
- ./bot/gibberish:/app/applications-bot/bot/gibberish
env_file: ./bot/.env
environment:
MONGODB_URI: mongodb://mongo:27017/applications-bot