Skip to content

Commit 2adbe07

Browse files
committed
Use docker volumes to store node_modules. The build should be faster.
1 parent 63bd06d commit 2adbe07

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docker-compose.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ services:
55
dockerfile: Dockerfile
66
volumes:
77
- ./:/app
8-
- go-cache:/root/.cache/go-build
9-
- go-mod-cache:/root/go/pkg/mod
8+
- go-cache:/root/.cache/go-build/
9+
- go-mod-cache:/root/go/pkg/mod/
10+
- node_modules:/app/node_modules/
1011
working_dir: /app
1112
command: bash -c "cd /app && npm ci && GOFLAGS=-buildvcs=false mage -v build:Backend && npm run build"
1213

@@ -54,6 +55,7 @@ services:
5455
dockerfile: Dockerfile
5556
volumes:
5657
- .:/app
58+
- node_modules:/app/node_modules
5759
working_dir: /app
5860
ports:
5961
- "8080:8080"
@@ -93,3 +95,4 @@ services:
9395
volumes:
9496
go-cache:
9597
go-mod-cache:
98+
node_modules:

0 commit comments

Comments
 (0)