-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
90 lines (82 loc) · 1.64 KB
/
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
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
89
90
services:
api:
build: .
container_name: sneakers_api
working_dir: /app
depends_on:
- db
- redis
expose:
- "8000"
networks:
- sneakers_network
restart: always
env_file:
- ".env"
celery_worker:
build: .
container_name: sneakers_worker
working_dir: /app
command: celery -A api.tasks worker --loglevel=info
depends_on:
- api
- redis
- rabbitmq
networks:
- sneakers_network
restart: always
env_file:
- ".env"
nginx:
image: nginx:alpine-slim
container_name: sneakers_nginx
ports:
- "80:80"
volumes:
- ./nginx/nginx.local.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api
networks:
- sneakers_network
restart: always
db:
image: postgres:16-alpine
container_name: sneakers_db
environment:
POSTGRES_DB: Sneakers
POSTGRES_USER: solesearch
POSTGRES_PASSWORD: solesearch
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- sneakers_network
restart: always
redis:
image: redis:alpine
container_name: sneakers_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- sneakers_network
restart: always
rabbitmq:
image: rabbitmq:alpine
container_name: sneakers_rabbitmq
ports:
- "5672:5672"
networks:
- sneakers_network
environment:
- RABBITMQ_DEFAULT_USER=solesearch
- RABBITMQ_DEFAULT_PASS=solesearch
restart: always
volumes:
postgres_data:
redis_data:
networks:
sneakers_network:
driver: bridge