-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (42 loc) · 947 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
43
44
45
46
version: '3.9'
services:
bot:
container_name: ${PROJECT_NAME}-bot
build:
dockerfile: Dockerfile.bot
context: .
working_dir: "/usr/src/app/${BOT_NAME:-tg_bot}"
volumes:
- .:/usr/src/app/${BOT_NAME:-tg_bot}
command: python bot.py
restart: always
depends_on:
- db
- web
env_file: .env
web:
container_name: ${PROJECT_NAME}-web
build:
dockerfile: Dockerfile.web
context: .
working_dir: "/usr/src/app/${PROJECT_NAME:-web}"
volumes:
- .:/usr/src/app/${PROJECT_NAME:-web}
command: python manage.py runserver 0.0.0.0:8000
ports:
- 8000:8000
restart: always
depends_on:
- db
env_file: .env
db:
image: postgres:15.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
restart: always
container_name: ${PROJECT_NAME}-db
env_file: .env
ports:
- 5433:5432
volumes:
postgres_data: