-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
116 lines (107 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
serv1:
image: node:7
command: npm run backend
working_dir: /app
volumes:
- ./server:/app
environment:
PORT: 3000
CONNECTION_STRING_DEV: postgres://user:password@db/db
ports:
- "3000:3000"
- "5858:5858"
links:
- db
- nodestore
serv2:
image: node:7
command: npm run backend
working_dir: /app
volumes:
- ./server:/app
environment:
PORT: 3000
CONNECTION_STRING_DEV: postgres://user:password@db/db
ports:
- "3001:3000"
links:
- db
- nodestore
nodestore:
image: node:7
command: npm run store
working_dir: /storeapp/
volumes:
- ./nodestore:/storeapp/
environment:
PORT: 3500
ports:
- "3500:3500"
db:
image: postgres
expose:
- 5432
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: user
POSTGRES_DB: db
public:
image: nginx
ports:
- "8080:8080"
volumes:
- ./nginx/publicDefault/default.conf:/etc/nginx/conf.d/default.conf
- ./public:/usr/share/nginx/html
apidoc:
image: nginx
ports:
- "8500:8080"
volumes:
- ./nginx/apidocDefault/default.conf:/etc/nginx/conf.d/default.conf
- ./apidoc:/usr/share/nginx/html
loadbalancer:
image: nginx
ports:
- "9000:80"
links:
- serv1
- serv2
- nodestore
- public
- apidoc
volumes:
- ./nginx/loadbalancerDefault/default.conf:/etc/nginx/conf.d/default.conf
varnish:
image: million12/varnish
ports:
- "8000:80"
links:
- loadbalancer:loadbalancer
volumes:
- ./nginx/default.vcl:/etc/varnish/default.vcl
# DEV ONLY
frontend:
image: node:7
command: npm run webpack
working_dir: /app/frontend/
volumes:
- ./frontend:/app/frontend/
- ./public:/app/public
environment:
PORT: 4000
ports:
- "4000:4000"
tests:
image: node:7
command: npm run backend
working_dir: /app/tests/
environment:
CONNECTION_STRING_DEV: postgres://user:password@db/db
volumes:
- ./tests:/app/tests/
- ./server:/app/server/
- ./frontend:/app/frontend/
- ./nodestore:/app/nodestore/
links:
- db
- nodestore