forked from TimNekk/TGBotTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (46 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: '3.3'
services:
bot:
image: "${BOT_IMAGE_NAME:-tg_bot-image}"
container_name: "${BOT_CONTAINER_NAME:-tg_bot-container}"
stop_signal: SIGINT
build:
context: .
working_dir: "/usr/src/app/${BOT_NAME:-tg_bot}"
volumes:
- .:/usr/src/app/${BOT_NAME:-tg_bot}
command: python3 -m bot
restart: always
env_file:
- ".env"
depends_on:
- db
- redis
networks:
- tg_bot
db:
container_name: "${DB_CONTAINER_NAME:-db-container}"
image: postgres:14
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
restart: always
ports:
- "${DB_EXPOSE_PORT:-5432}:5432"
networks:
- tg_bot
volumes:
- ./postgres:/var/lib/postgresql
redis:
container_name: "${REDIS_CONTAINER_NAME:-redis-container}"
image: redis:alpine
command: "redis-server --requirepass ${REDIS_PASS:-password123}"
restart: always
networks:
- tg_bot
volumes:
- ./redis:/data
networks:
tg_bot:
driver: bridge