Skip to content

Commit c5b0267

Browse files
committed
Add a bind mount so that we can have live updates in the container when code changes in the devcontainer. Use the HOST_PROJECT_PATH environment variable until I can get relative paths to work in docker-compose.yml.
1 parent 0d1cc27 commit c5b0267

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ services:
66
build:
77
context: .
88
dockerfile: frontend/Dockerfile
9+
environment:
10+
- CHROME_BIN=/usr/bin/chromium
11+
volumes:
12+
# The following works but shouldn't be necessary:
13+
# - /Users/davidsilva/Dev/interview-prep/frontend:/app/frontend
14+
- ${HOST_PROJECT_PATH}/frontend:/app/frontend
15+
# The following *should* work, but it doesn't:
16+
# - ./frontend:/app/frontend
17+
- /app/frontend/node_modules
918
image: interview-prep-frontend:latest
1019
ports:
1120
- "4200:4200"
@@ -25,6 +34,13 @@ services:
2534
- "3000:3000"
2635
environment:
2736
- DATABASE_URL=${DATABASE_URL}
37+
volumes:
38+
# The following works but shouldn't be necessary:
39+
# - /Users/davidsilva/Dev/interview-prep/backend:/app/backend
40+
- ${HOST_PROJECT_PATH}/backend:/app/backend
41+
# The following *should* work, but it doesn't:
42+
# - ./backend:/app/backend
43+
- /app/backend/node_modules
2844
command: npm run dev
2945
depends_on:
3046
- db

0 commit comments

Comments
 (0)