forked from sputnik-llc/fullstack-test-task
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
60 lines (53 loc) · 1.34 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
60 lines (53 loc) · 1.34 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
services:
backend-db:
image: postgres:16-alpine
container_name: backend-db
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- backend-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 3s
timeout: 3s
retries: 5
backend-redis:
image: redis:latest
container_name: backend-redis
backend:
build: ./backend
command: granian --interface asgi src.app:app --host 0.0.0.0 --port 8000 --workers 4 --reload
container_name: backend
volumes:
- ./backend:/backend
- /backend/.venv
env_file: ".env.dev"
ports:
- "8000:8000"
depends_on:
backend-db:
condition: service_healthy
backend-worker:
build: ./backend
command: [ 'rq', 'worker', '-u', 'redis://backend-redis:6379/0', 'file_tasks' ]
container_name: backend-worker
env_file: ".env.dev"
volumes:
- ./backend:/backend
- /backend/.venv
depends_on:
backend-db:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
ports:
- "3000:3000"
volumes:
backend-db-volume: