-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
50 lines (47 loc) · 1.19 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
38
39
40
41
42
43
44
45
46
47
48
49
50
version: "3.8"
services:
todo-bot:
build: .
container_name: todo-bot
environment:
- BOT_CREDENTIALS=cts_host@secret_key@bot_id
- POSTGRES_DSN=postgres://postgres:postgres@todo-bot-postgres/todo_bot_db
- REDIS_DSN=redis://todo-bot-redis/0
- DEBUG=true
ports:
- "8000:8000" # Отредактируйте порт хоста (первый), если он уже занят
restart: always
depends_on:
- postgres
- redis
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
postgres:
image: postgres:13.2-alpine
container_name: todo-bot-postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=todo_bot_db
restart: always
volumes:
- ./.storages/postgresdata:/var/lib/postgresql/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
redis:
image: redis:6.2-alpine
container_name: todo-bot-redis
restart: always
volumes:
- ./.storages/redisdata:/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"