-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (60 loc) · 1.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (60 loc) · 1.37 KB
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
version: '3.7'
services:
test-node:
container_name: test-node
build:
context: .
dockerfile: Dockerfile
volumes:
- './src:/app'
- '/app/node_modules'
ports:
- 9999:3000
environment:
- CHOKIDAR_USEPOLLING=true
stdin_open: true
tty: true
#command: ["npm", "run", "s", "--silent"]
command: ["npm", "start"]
#command: ["ls", "/app/node_modules"]
depends_on:
- node-database
node-server:
container_name: node-server
build:
context: .
dockerfile: Dockerfile.server
volumes:
- './server:/opt/server'
- '/opt/server/node_modules'
#working_dir: /opt/server
expose:
- 9900
ports:
- 9900:9900
environment:
- PORT=9900
- HOST=0.0.0.0
command: ['npm', 'start']
node-database:
container_name: node-database
image: postgres
ports:
- 5555:5432
volumes:
- './test-db:/var/lib/postgresql/testdata'
- './test-db/test.sql:/docker-entrypoint-initdb.d/test.sql'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
# - PGDATA=/var/lib/postgresql/testdata
nginx:
image: nginx:alpine
container_name: nginx
volumes:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
ports:
- 8080:80
depends_on:
- test-node
- node-server