-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
32 lines (27 loc) · 781 Bytes
/
Copy pathcompose.yaml
File metadata and controls
32 lines (27 loc) · 781 Bytes
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
services:
app:
image: node:22-bookworm-slim
init: true
working_dir: /workspace
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
volumes:
- .:/workspace
- node_modules:/workspace/node_modules
ports:
- "127.0.0.1:5173:5173"
- "127.0.0.1:4173:4173"
environment:
VITE_HOST: 0.0.0.0
command: >
sh -c "deps_hash=$$(sha256sum package.json package-lock.json | sha256sum | cut -d ' ' -f 1);
if [ ! -f node_modules/.install-hash ] || [ \"$$(cat node_modules/.install-hash)\" != \"$$deps_hash\" ];
then npm ci --ignore-scripts
&& rm -rf node_modules/.vite
&& printf '%s' \"$$deps_hash\" > node_modules/.install-hash;
fi;
npm run dev"
volumes:
node_modules: