-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
60 lines (53 loc) · 1.15 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
version: "2"
services:
node:
image: "node:14"
user: "node"
working_dir: /home/node/app/src
environment:
- NODE_ENV=dev
volumes:
- ./:/home/node/app
ports:
- "127.0.0.1:8081:3000"
networks:
vpcbr:
ipv4_address: 10.5.0.4
command: bash -c "npm install && npm start"
node_rest:
image: "node"
user: "node"
working_dir: /home/node/app/webdev_rest
environment:
- NODE_ENV=dev
volumes:
- ./:/home/node/app
expose:
- 3300
networks:
vpcbr:
ipv4_address: 10.5.0.5
command: bash -c "npm install pg && npm install axios && node index.js"
db:
image: "postgres"
expose:
- 5432
networks:
vpcbr:
ipv4_address: 10.5.0.6
restart: always
environment:
- POSTGRES_PASSWORD=admin
volumes:
- database_data:/var/lib/postgresql/data
- ./create_databases.sql:/docker-entrypoint-initdb.d/create_databases.sql
volumes:
database_data:
driver: local
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1