-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
82 lines (82 loc) · 1.73 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
version: '3'
services:
#----- API Gatway ---------
nginx:
image: 'nginx:alpine'
container_name: 'api_gateway'
depends_on:
- api_customer
- api_book
- api_blog
volumes:
- ./gateway/default.conf:/etc/nginx/conf.d/default.conf
- ./gateway/index.html:/usr/share/nginx/html/index.html
ports:
- '80:80'
networks:
- proxy
#----- REST API Customer powered by Node.js
api_customer:
container_name: 'api_customer'
build:
context: ./customer/
image: api_customer:latest
ports:
- '8000:8000'
networks:
- proxy
#----- REST API Book powered by Golang
api_book: # Golang REST service
container_name: 'api_book'
build:
context: ./book/api_book/api/
image: api_book:latest
depends_on:
- go_db
ports:
- '8001:8001'
networks:
- proxy
- db
#----- Postgresql DB is used by REST API Book
go_db:
image: 'postgres:alpine'
container_name: 'go_db'
ports:
- '5432'
environment:
- POSTGRES_USER=docker
- POSTGRES_PASSWORD=docker
networks:
- db
#----- REST API Blog powered by ASP.net MVC Core
api_blog:
container_name: 'api_blog'
build:
context: ./blog/
image: api_blog:latest
depends_on:
- mssqlserver
ports:
- '8002:8002'
networks:
- proxy
- db
#----- SQLServer DB is used by REST API api_blog
mssqlserver:
container_name: sqlserver
image: microsoft/mssql-server-linux:2017-latest
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=SA123456!
ports:
- "1433:1433"
logging:
options:
max-size: 1m
networks:
- db
#----- Define networks
networks:
proxy:
db: