-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (57 loc) · 1.39 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
version: '3'
services:
redis:
restart: always
image: 'bitnami/redis:latest'
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
DISABLE_COMMANDS: ${REDIS_DISABLE_COMMANDS}
client:
restart: always
image: "node:10"
user: "$DOCKER_USER"
working_dir: /home/node/client
volumes:
- ./app/client:/home/node/client
environment:
NODE_ENV: "development"
SERVER_NAME_SERVER: ${SERVER_NAME_SERVER}
SERVER_NAME_CLIENT: ${SERVER_NAME_CLIENT}
ports:
- "81:81"
command: >
bash -c "npm install
&& npm run serve"
daemon:
image: "node:10"
user: "$DOCKER_USER"
working_dir: /home/node/daemon
volumes:
- ./app/daemon:/home/node/daemon
command: >
bash -c "npm install
&& npm run start-daemon"
server:
image: "node:10"
user: "$DOCKER_USER"
working_dir: /home/node/daemon
environment:
SERVER_NAME_SERVER: ${SERVER_NAME_SERVER}
SERVER_NAME_CLIENT: ${SERVER_NAME_CLIENT}
command: >
bash -c "npm install
&& npm run start-server"
nginx:
restart: always
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx/working:/etc/nginx/conf.d/
- ./app/server:/var/server
- ./volumes/server/logs:/var/log/nginx/server
- ./volumes/client/logs:/var/log/nginx/client
links:
- client
- server