Skip to content

Commit 46176b7

Browse files
committed
Use more volumes in docker-compose file
Also mount source directories as read-only (just in case)
1 parent e5bfbf2 commit 46176b7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ npm-debug.log
1919
yarn-error.log
2020
testem.log
2121
.env
22+
docker-compose.override.yml

docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ services:
2828
volumes:
2929
# Mount the src/ directory so we don't have to rebuild the Docker image
3030
# when we want to change some code
31-
- ./src:/app/src
31+
- ./src:/app/src:ro
32+
3233
- index:/app/tmp
33-
- cargo-cache:/app/target
34+
- cargo-cache:/usr/local/cargo/registry
35+
- target-cache:/app/target
3436
frontend:
3537
build:
3638
context: .
@@ -42,9 +44,10 @@ services:
4244
- 4200:4200
4345
volumes:
4446
# Mount the app/ directory so live reload works
45-
- ./app:/app/app
47+
- ./app:/app/app:ro
4648

4749
volumes:
4850
postgres-data:
4951
cargo-cache:
52+
target-cache:
5053
index:

0 commit comments

Comments
 (0)