generated from mazgi/template.containerized-nextjs-project
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
103 lines (99 loc) · 2.35 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
x-service-node-webapp-base: &node-webapp-base
build:
args:
GID: ${GID:-0}
UID: ${UID:-0}
context: Dockerfile.d/node-webapp.development
command:
- zsh
- --login
- -c
- |
npm-check-updates --upgrade
npm install
npm audit fix
sort-package-json
sleep infinity
init: true
user: ${UID:-0}:${GID:-0}
volumes:
- home-developer:/home/developer
- home-root:/root # for macOS & Windows
- .:/workspace
working_dir: /workspace
x-service-frontend-base: &frontend-base
<<: *node-webapp-base
build:
args:
GID: ${GID:-0}
UID: ${UID:-0}
HEALTHCHECK_URL: http://localhost:3000/api/status
context: Dockerfile.d/node-webapp.development
environment:
BFF_ENDPOINT_GRAPHQL_HTTP: http://${PUBLIC_IP_ADDR_OR_FQDN:-127.0.0.1}:4000/graphql
BFF_ENDPOINT_GRAPHQL_WEBSOCKET: ws://${PUBLIC_IP_ADDR_OR_FQDN:-127.0.0.1}:4000/graphql
working_dir: /workspace/frontend
services:
frontend:
<<: *frontend-base
command:
- zsh
- --login
- -c
- |
npm-check-updates --upgrade
npm install
npm audit fix
sort-package-json
npm run dev:debug
ports:
- ${BIND_IP_ADDR:-127.0.0.1}:3000:3000
- ${BIND_IP_ADDR:-127.0.0.1}:39229:9229
frontend-storybook:
<<: *frontend-base
command:
- zsh
- --login
- -c
- |
npm run storybook
depends_on:
- frontend
healthcheck:
disable: true
ports:
- ${BIND_IP_ADDR:-127.0.0.1}:6006:6006
profiles:
- all
- tools
frontend-test-watch:
<<: *frontend-base
command:
- zsh
- --login
- -c
- |
npm run test:watch
depends_on:
- frontend
healthcheck:
disable: true
profiles:
- all
- test-watch
# for Prettier Code Formatter
# ["INFO" - 00:00:00 AM] Attempted to determine module path from /path/to/the/project
# ["ERROR" - 00:00:00 AM] Failed to load module. If you have prettier or plugins referenced in package.json, ensure you have run `npm install`
# ["ERROR" - 00:00:00 AM] Cannot find module 'prettier' from '/path/to/the/project'
workspace:
<<: *node-webapp-base
healthcheck:
disable: true
version: '3.9'
volumes:
home-developer:
driver: local
home-root:
driver: local
mysql-data:
driver: local