-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
59 lines (55 loc) · 1.31 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: cpn-telegram-bot
services:
cpn:
build:
context: ../
dockerfile: telegram-bot/dev.Dockerfile
restart: unless-stopped
environment:
DB_URI: 'mongodb://root:example@db:27017'
LOCAL_BOT_API_URL: 'http://bot:8081/bot'
develop:
watch:
- path: src/
target: /app/src/
action: sync+restart
- path: ./../core/
target: /app/core/
action: sync+restart
- path: pyproject.toml
target: /app/pyproject.toml
action: rebuild
volumes:
- ./.env:/app/.env
depends_on:
db:
required: true
condition: service_started
bot:
required: true
condition: service_started
bot:
image: 'aiogram/telegram-bot-api:8.2'
ports:
- 8081:8081
restart: unless-stopped
environment:
TELEGRAM_API_ID: ${TELEGRAM_API_ID}
TELEGRAM_API_HASH: ${TELEGRAM_API_HASH}
TELEGRAM_HTTP_PORT: 8081
TELEGRAM_LOCAL: 1
TELEGRAM_STAT: 1
db:
image: 'mongo:8'
command: --config /etc/mongod.conf
ports:
- 27017:27017
restart: unless-stopped
volumes:
- db:/data/db
- ./mongod.conf:/etc/mongod.conf
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
volumes:
db: