Skip to content

Commit 334e5a2

Browse files
committed
Enable automatic reloading by mounting local 'src' directory and passing the --poll flag to serve command.
1 parent ffc53c3 commit 334e5a2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ EXPOSE 4000
3030
# On startup, run this command to start application in dev mode
3131
ENTRYPOINT [ "npm", "run", "serve" ]
3232
# By default set host to 0.0.0.0 to listen/accept connections from all IP addresses.
33-
CMD ["--", "--host 0.0.0.0"]
33+
# Poll for changes every 5 seconds (if any detected, app will rebuild/restart)
34+
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)