-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.16 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
version: "2"
services:
nginx:
build: ./nginx
links:
- node1:node1
- node2:node2
- node3:node3
ports:
- "80:80"
node1:
build: ./nodejs
links:
- db
environment:
PORT: 4000
SECRET: secret
ACCESS_TOKEN_EXPIRES: 24h
DB_CONNECTION: postgres://postgres:pass@db:5432/nodejs_reverse_proxy_example
NODE_ENV: "production"
ports:
- "4000:4000"
node2:
build: ./nodejs
links:
- db
environment:
PORT: 4000
SECRET: secret
ACCESS_TOKEN_EXPIRES: 24h
DB_CONNECTION: postgres://postgres:pass@db:5432/nodejs_reverse_proxy_example
NODE_ENV: "production"
ports:
- "4001:4000"
node3:
build: ./nodejs
links:
- db
environment:
PORT: 4000
SECRET: secret
ACCESS_TOKEN_EXPIRES: 24h
DB_CONNECTION: postgres://postgres:pass@db:5432/nodejs_reverse_proxy_example
NODE_ENV: "production"
ports:
- "4002:4000"
db:
image: postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=nodejs_reverse_proxy_example
ports:
- "5432:5432"