-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
42 lines (38 loc) · 1008 Bytes
/
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
38
39
40
41
42
version: '3.1'
name: xx-monitor-bot
services:
mongo:
image: mongo:6.0.6
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME # Value-less variables are pulled directly from .env
- MONGO_INITDB_ROOT_PASSWORD
volumes:
- ./mongo/db:/data/db
ports:
- ${MONGO_PORT}:27017
command: --quiet
bot:
restart: always
depends_on:
- mongo
build:
dockerfile: Dockerfile
environment:
- NODE_ENV=production
env_file:
- .env
watchtower:
# Watchtower will pull down your new image, gracefully shut down your existing container
# and restart it with the same options that were used when it was deployed initially
# https://github.com/containrrr/watchtower
image: containrrr/watchtower
restart: always
depends_on:
- bot
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_SCHEDULE
- TZ