forked from arctikant/fastapi-modular-monolith-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
66 lines (58 loc) · 1.23 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
59
60
61
62
63
64
65
66
version: '3.8'
services:
app:
build: .
ports:
- "8000:8000"
- "5555:5555"
environment:
- ENVIRONMENT=${ENVIRONMENT}
- BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS}
- HOST=${HOST}
- PORT=${PORT}
volumes:
- .:/app
networks:
- app-network
db:
image: postgres:16.3-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/db/init_scripts:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=app
networks:
- app-network
redis:
image: redis:7.2-alpine
ports:
- "6379:6379"
command: redis-server --save 60 1 --loglevel warning
volumes:
- redis-data:/data
networks:
- app-network
queue_worker:
build: .
volumes:
- .:/app
command: taskiq worker app.core.services.queue.providers.taskiq.setup:broker app.core.tasks
networks:
- app-network
mailhog:
image: mailhog/mailhog
ports:
- "1025:1025" # SMTP port
- "8025:8025" # Web UI port
networks:
- app-network
volumes:
postgres_data:
redis-data:
networks:
app-network:
driver: bridge