Skip to content

Commit 0333a10

Browse files
committed
Enable automatic reloading by mounting local 'src' directory and passing the --poll flag to serve command.
1 parent 72a13f5 commit 0333a10

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ EXPOSE 4000
3333

3434
# On startup, run this command to start application in dev mode
3535
ENTRYPOINT [ "npm", "run", "serve" ]
36-
# By default set host to 0.0.0.0 for UI
37-
CMD ["--", "--host 0.0.0.0"]
36+
# By default set host to 0.0.0.0 for UI. Poll for changes every 5 seconds (if any detected, app will rebuild/restart)
37+
CMD ["--", "--host 0.0.0.0", "--poll 5000"]

docker/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ services:
3838
target: 4000
3939
- published: 9876
4040
target: 9876
41+
volumes:
42+
# Mount the local 'src' directory to the '/app' directory on the container.
43+
# Allows the UI to "watch" this directory for changes and reload/rebuild when changes are detected.
44+
- ../src:/app/src

0 commit comments

Comments
 (0)