-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
32 lines (32 loc) · 990 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
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
depends_on:
- broker
volumes:
- ./chat_app/chat_app.db:/chat_app/chat_app.db # Map the 'db' directory on the host to '/app/db' inside the container
restart: always # Optional: Enable automatic restart of the app service
broker:
image: rabbitmq:3.9.12
ports:
- "5672:5672"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
restart: always # Optional: Enable automatic restart of the broker service
worker:
build:
context: .
dockerfile: Dockerfile
command: celery -A chat_app.tasks worker --loglevel=info
depends_on:
- app
- broker
volumes:
- ./chat_app/chat_app.db:/chat_app/chat_app.db # Map the 'db' directory on the host to '/app/db' inside the container
restart: always # Optional: Enable automatic restart of the worker service