-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
72 lines (67 loc) · 1.49 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
64
65
66
67
68
69
70
71
72
######
##
# start: docker-compose -f docker-compose-dev.yml up -d <service>
##
######
version: '2.3'
networks:
anet:
services:
# BEGIN: frontend-server
node:
image: node:12.16.2
volumes:
- ${PWD}:/opt/project
ports:
- 3000:3000
networks:
- anet
working_dir: /opt/project/server
entrypoint:
- /bin/sh
- -c
- |
echo installing modules ...
npm install
echo starting server ...
npm start
environment:
- NODE_ENV=production
# END: frontend server
# BEGIN: frontend server watch development. Connect with docker exec -ti .. bash and run npm run watch
watch:
image: node:12.16.2
volumes:
- ${PWD}:/opt/project
ports:
- 3000:3000
networks:
- anet
working_dir: /opt/project/server
entrypoint:
- /bin/sh
- -c
- |
echo installing modules ...
npm install
echo starting server in watch mode ...
npm run watch
environment:
- NODE_ENV=development
# END: frontend server watch development
# BEGIN: frontend server bash development. Connect with 'docker exec -ti asentvis_bash_1 bash' and run 'npm run watch'
bash:
image: node:12.16.2
volumes:
- ${PWD}:/opt/project
ports:
- 3000:3000
networks:
- anet
stdin_open: true
tty: true
working_dir: /opt/project/server
entrypoint: bash
environment:
- NODE_ENV=development
# END: frontend server bash development