-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (62 loc) · 1.44 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
version: '2'
services:
db:
image: postgres:13-alpine
hostname: db
mem_limit: 256m
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "15432:5432"
redis:
image: redis:6-alpine
hostname: redis
restart: always
mem_limit: 512m
rabbit:
hostname: rabbit
image: rabbitmq:3-alpine
restart: always
mem_limit: 512m
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=audiomaster
ports:
- "5672:5672" # we forward this port because it's useful for debugging
- "15672:15672" # here, we can access rabbitmq management plugin
web:
build:
context: .
dockerfile: Dockerfile
hostname: web
restart: always
mem_limit: 512m
command: ./run_web.sh
# volumes:
# - ./web_services/final-project.json:/app/web_services/final-project.json # mount credential
ports:
- "8000:8000"
links:
- db
- rabbit
- redis
depends_on:
- db
worker:
build:
context: .
dockerfile: Dockerfile
command: ./run_celery.sh
restart: always
mem_limit: 512m
# volumes:
# - ./web_services/final-project.json:/app/web_services/final-project.json # mount credential
links:
- db
- rabbit
- redis
depends_on:
- rabbit