-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (41 loc) · 1.1 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
version: "3.1"
volumes:
postgresVolume:
services:
db:
image: postgres:latest
volumes:
- postgresVolume:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
hmaraserver:
build: .
container_name: hamaraserver1
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/postgres
volumes:
- ./app.js:/src/app/app.js
hmaraserver2:
build: .
container_name: hamaraserver2
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/postgres
volumes:
- ./app.js:/src/app/app.js
hmaraserver3:
build: .
container_name: hamaraserver3
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/postgres
volumes:
- ./app.js:/src/app/app.js
mainserver:
build: .
ports:
- 9000:9000
volumes:
- ./server.js:/src/app/server.js
- ./serverHandler.js:/src/app/serverHandler.js
environment:
- servers=["http://hamaraserver1:8000", "http://hamaraserver2:8000", "http://hamaraserver3:8000"]
command: ["nodemon", "/src/app/server.js"]