-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
86 lines (81 loc) · 1.55 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "3.8"
services:
# db container
postgres:
build:
context: docker
dockerfile: Dockerfile-db
environment:
- POSTGRES_USER=dev_user
- POSTGRES_PASSWORD=123456
- POSTGRES_DB_NAME=dev_test
- POSTGRES_SCHEMA_NAME=public
ports:
- "5432:5432"
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
redis:
image: redis:latest
ports:
- "6379:6379"
restart: on-failure
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
redis-messagebus:
build:
context: .
dockerfile: docker/Dockerfile-redis-mbus
depends_on:
- redis
env_file:
- ./.env
environment:
- postgres_host=postgres
- app_redis_url=redis
volumes:
- ./src:/src
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
# api container
api:
build:
context: .
dockerfile: docker/Dockerfile
depends_on:
- postgres
- redis
env_file:
- ./.env
environment:
- postgres_host=postgres
- app_redis_url=redis
volumes:
- ./src:/src
ports:
- "8000:8000"
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M