-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
63 lines (63 loc) · 1.44 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
version: '2'
services:
fssk-node-client:
build:
context: ./
dockerfile: deploy/local.docker
hostname: 'client'
container_name: 'fssk-node-client'
env_file: ./client/.env
command: 'npm start'
ports:
- '3000:3000'
volumes:
- './client:/opt/src'
- 'client-node-modules:/opt/src/node_modules'
working_dir: '/opt/src'
depends_on:
- fssk-node-server
links:
- 'fssk-node-server:fssk-server'
networks:
- app
fssk-node-server:
build:
context: ./
dockerfile: deploy/local.docker
hostname: 'server'
container_name: 'fssk-node-server'
env_file: ./server/.env
command: 'npm start'
ports:
- '4000:4000'
volumes:
- './server:/opt/src'
- 'server-node-modules:/opt/src/node_modules'
working_dir: '/opt/src'
depends_on:
- fssk-node-db
links:
- 'fssk-node-db:db'
networks:
- app
fssk-node-db:
environment:
- 'POSTGRES_USER=root'
- 'POSTGRES_DB=test'
- 'POSTGRES_PASSWORD=admin'
image: 'postgres:9.6'
container_name: 'fssk-node-db'
ports:
- '5432:5432'
volumes:
- 'fssk-node-db-data:/var/lib/postgresql/data'
- './db:/docker-entrypoint-initdb.d/'
networks:
- app
networks:
app:
driver: bridge
volumes:
fssk-node-db-data:
client-node-modules:
server-node-modules: