-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
93 lines (92 loc) · 2.02 KB
/
docker-compose-dev.yml
File metadata and controls
93 lines (92 loc) · 2.02 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3.9"
services:
db:
image: postgres:alpine3.17
container_name: yt_db
env_file:
- .env
volumes:
- .:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT_DEV}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
restart: on-failure
redis:
image: redis:latest
container_name: redis_dev
entrypoint: redis-server
command: --requirepass ${REDIS_PASSWORD}
bot:
build:
context: .
dockerfile: docker/bot.Dockerfile
container_name: dmkh_bot
env_file:
- .env
environment:
TOKEN: ${TOKEN_DEV}
BACKEND: backend
REDIS_HOST: redis_dev
volumes:
- ./bot:/app/bot
depends_on:
- redis
restart: on-failure
entrypoint: poetry run python3 -m bot
backend:
build:
context: .
dockerfile: docker/back.Dockerfile
container_name: backend
env_file:
- .env
environment:
POSTGRES_HOST: yt_db
TOKEN: ${TOKEN_DEV}
REDIS_HOST: redis_dev
volumes:
- ./src:/app/src
ports:
- "9090:9090"
depends_on:
- db
- redis
entrypoint: poetry run python3 -m src
celery:
build:
context: .
dockerfile: docker/back.Dockerfile
container_name: celery_dev
env_file:
- .env
environment:
POSTGRES_HOST: db_prod
TOKEN: ${TOKEN_DEV}
REDIS_HOST: redis_dev
volumes:
- ./src:/app/src
depends_on:
- backend
- redis
restart: on-failure
entrypoint: celery --app=src.tasks.tasks:celery worker -l INFO
lab:
build:
context: .
dockerfile: docker/lab.Dockerfile
container_name: study_lab
env_file:
- .env
environment:
POSTGRES_HOST: yt_db
TOKEN: ${TOKEN_DEV}
ports:
- "${LAB_PORT}:${LAB_PORT}"
volumes:
- ./data:/app/data
entrypoint: jupyter lab --ip=0.0.0.0 --port=${LAB_PORT} --no-browser --allow-root