-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
38 lines (38 loc) · 999 Bytes
/
docker-compose.yaml
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
version: '3.8'
services:
telegram-bot-terminator:
container_name: telegram-bot-terminator
image: the-matrix/python
build:
context: ./
dockerfile: dockerfile
environment:
TELEGRAM_TOKEN: ${TELEGRAM_TOKEN}
TELEGRAM_WEBHOOK_URL: ${TELEGRAM_WEBHOOK_URL}
TELEGRAM_BOT_LISTEN_PORT: ${TELEGRAM_BOT_LISTEN_PORT}
MONGODB_USER: ${MONGODB_USER}
MONGODB_PASS: ${MONGODB_PASS}
ports:
- "8080:80/tcp"
volumes:
- type: bind
source: ./script
target: /script
working_dir: /script
command: [ "python3", "-u", "main.py" ]
restart: unless-stopped
mongodb:
image: mongo
container_name: telegram-bot-terminator-mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASS}
volumes:
- type: volume
source: mongodb
target: /data/db
ports:
- "27017:27017/tcp"
restart: unless-stopped
volumes:
mongodb: