-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
69 lines (64 loc) · 1.49 KB
/
compose.yaml
File metadata and controls
69 lines (64 loc) · 1.49 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
name: aivideo-dev
services:
app:
image: ${COMPOSE_PROJECT_NAME}:latest
env_file:
- .env
command:
[
"sh",
"-c",
"alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 7001 --reload",
]
networks:
- hng-network
restart: unless-stopped
ports:
- 7100:7001
working_dir: /app
depends_on:
- db
db:
image: postgres:14.12
restart: always
env_file:
- .env
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD?Variable not set}
- POSTGRES_USER=${DB_USER?Variable not set}
- POSTGRES_DB=${DB_NAME?Variable not set}
volumes:
- db:/var/lib/postgresql/data
networks:
- hng-network
healthcheck:
test: pg_isready -U ${DB_USER} -d ${DB_NAME}
interval: 10s
timeout: 5s
retries: 5
rabbitmq:
container_name: rabbitmq
restart: always
image: rabbitmq:3.9-alpine
networks:
- hng-network
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER?Variable not set}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS?Variable not set}
celery_worker:
image: ${COMPOSE_PROJECT_NAME}:latest
command: celery -A api.core.dependencies.celery.celery_app worker --loglevel=info
networks:
- hng-network
env_file:
- .env
environment:
- CELERY_BROKER_URL=${CELERY_BROKER_URL?Variable not set}
depends_on:
- rabbitmq
- app
volumes:
db:
networks:
hng-network:
driver: bridge