-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
executable file
·92 lines (90 loc) · 2.67 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
version: '2'
services:
postgres:
image: postgres:9.6
environment:
POSTGRES_USER: "developer"
POSTGRES_PASSWORD: "developer"
POSTGRES_DB: "dev_database"
container_name: database
volumes:
- ./psql-scripts/init-resolution-schema.sql:/docker-entrypoint-initdb.d/init-1-resolution-schema.sql
- ./psql-scripts/init-user-schema.sql:/docker-entrypoint-initdb.d/init-2-user-schema.sql
- ./psql-scripts/init-benefits-schema.sql:/docker-entrypoint-initdb.d/init-3-benefits-schema.sql
- ./psql-scripts/init-news-schema.sql:/docker-entrypoint-initdb.d/init-4-news-schema.sql
ports:
- "5432:5432"
networks:
backend:
ipv4_address: 172.25.0.2
user:
build:
context: .
dockerfile: packages/user/Dockerfile
container_name: user1
volumes:
- ./packages/user/:/usr/src/app/user
- /usr/src/app/user/node_modules
ports:
- "3000:3000"
links:
- postgres
networks:
backend:
ipv4_address: 172.25.0.3
restart: 'no'
resolution:
build:
context: .
dockerfile: packages/resolution/Dockerfile
container_name: resolution1
volumes:
- ./packages/resolution/:/usr/src/app/resolution
- /usr/src/app/user/node_modules
ports:
- "3002:3002"
links:
- postgres
networks:
backend:
ipv4_address: 172.25.0.4
restart: 'no'
benefits:
build:
context: .
dockerfile: packages/benefits/Dockerfile
container_name: benefits1
volumes:
- ./packages/benefits/:/usr/src/app/benefits
- /usr/src/app/benefits/node_modules
ports:
- "3003:3003"
links:
- postgres
networks:
backend:
ipv4_address: 172.25.0.6
restart: 'no'
news:
build:
context: .
dockerfile: packages/news/Dockerfile
container_name: news1
volumes:
- ./packages/news/:/usr/src/app/news
- /usr/src/app/news/node_modules
ports:
- "3004:3004"
links:
- postgres
networks:
backend:
ipv4_address: 172.25.0.7
restart: 'no'
networks:
backend:
driver: "bridge"
ipam:
config:
- subnet: 172.25.0.0/16
gateway: 172.25.0.1