-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (75 loc) · 1.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (75 loc) · 1.69 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
version: "3.9"
services:
django:
build:
context: ./backend
dockerfile: Dockerfile
container_name: django_backend
command: >
sh -c "python manage.py migrate &&
daphne -b 0.0.0.0 -p 8002 core.asgi:application"
volumes:
- ./backend:/app
env_file:
- ./backend/.env
ports:
- "8002:8002"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
celery:
build:
context: ./backend
dockerfile: Dockerfile.celery
container_name: celery_worker
command: celery -A core worker --loglevel=info
volumes:
- ./backend:/app
env_file:
- ./backend/.env
depends_on:
- redis
- postgres
- django
celery_beat:
build:
context: ./backend
dockerfile: Dockerfile.celery
container_name: celery_beat
command: celery -A core beat --loglevel=info
volumes:
- ./backend:/app
env_file:
- ./backend/.env
depends_on:
- redis
- postgres
- django
redis:
image: redis:7
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
postgres:
image: pgvector/pgvector:pg15
container_name: postgres_db
restart: always
environment:
POSTGRES_DB: talento_db
POSTGRES_USER: talento_user
POSTGRES_PASSWORD: talento_pass
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres-init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U talento_user -d talento_db"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5433:5432"
volumes:
postgres_data: