-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
58 lines (53 loc) · 1.1 KB
/
docker-compose.yaml
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
version: '3.6'
services:
db:
image: postgres:15.3
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
volumes:
- ./.postgres-data:/var/lib/postgresql/data
rabbit:
image: "rabbitmq:3-management"
environment:
RABBITMQ_DEFAULT_USER: "rabbitmq"
RABBITMQ_DEFAULT_PASS: "rabbitmq"
RABBITMQ_DEFAULT_VHOST: "/"
ports:
- "15672:15672"
- "5672:5672"
mailhog:
image: mailhog/mailhog
ports:
- "8025:8025"
- "1025:1025"
api:
build:
context: .
dockerfile: docker/Dockerfile
command: uvicorn src.main:app --host 0.0.0.0 --reload
ports:
- "8000:8000"
volumes:
- "./src:/code/src"
depends_on:
- db
- rabbit
environment:
- PYTHONPATH=src
- PYTHONUNBUFFERED=1
worker:
build:
context: .
dockerfile: docker/Dockerfile
command: dramatiq src.worker -p 2
volumes:
- "./src:/code/src"
depends_on:
- db
- rabbit
environment:
- PYTHONPATH=src