-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
118 lines (110 loc) · 2.18 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3.7"
services:
db:
image: postgres
container_name: db
volumes:
- ./docker-postgresql-multiple-databases:/docker-entrypoint-initdb.d
- ./data/pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_MULTIPLE_DATABASES=userdb,interactiondb,contentdb
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5400:5432"
restart: always
networks:
- default
redis:
image: redis
container_name: redis
expose:
- "6379"
restart: always
networks:
- default
user_api:
build:
context: ./users
dockerfile: Dockerfile
container_name: user_api
volumes:
- ./users:/usr/src/app
environment:
- FLASK_APP=manage.py
depends_on:
- db
- redis
expose:
- "5000"
ports:
- "5001:5000"
command: ["bash", "start-Docker.sh"]
networks:
- default
content_api:
build:
context: ./content
dockerfile: Dockerfile
container_name: content_api
volumes:
- ./content:/usr/src/app
environment:
- FLASK_APP=manage.py
depends_on:
- db
- redis
expose:
- "5000"
ports:
- "5002:5000"
command: ["bash", "start-Docker.sh"]
networks:
- default
interaction_api:
build:
context: ./interaction
dockerfile: Dockerfile
container_name: interaction_api
volumes:
- ./interaction:/usr/src/app
environment:
- FLASK_APP=manage.py
depends_on:
- db
- redis
expose:
- "5000"
ports:
- "5003:5000"
command: ["bash", "start-Docker.sh"]
networks:
- default
swagger_ui:
image: swaggerapi/swagger-ui
container_name: swagger_ui
expose:
- "8080"
volumes:
- ./swagger/openapi.json:/openapi.json
environment:
- SWAGGER_JSON=/openapi.json
- BASE_URL=/docs
networks:
- default
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: nginx
restart: always
ports:
- "8080:80"
depends_on:
- user_api
- content_api
networks:
- default
networks:
default:
driver: bridge