Bind mount the html files so they can be updated without stopping the server

This commit is contained in:
Brad Treloar 2025-02-03 23:26:39 +10:30
parent f41aa86cfa
commit 5dcb4d526b
3 changed files with 6 additions and 5 deletions

View file

@ -9,13 +9,14 @@
# Build/rebuild the image.
docker build --no-cache -t notes-server .
# Run the image, listening on port 8080.
docker run -p 42069:80 -t notes-server
# Run the image, listening on port 42069.
docker run --mount type=bind,src=./site,dst=/usr/share/nginx/html -p 42069:80 -t notes-server
```
## Auth credentials setup
```bash
# Overwrite the htpasswd file with new user credentials.
htpasswd -nb username password > auth.htpasswd
# (Rebuild the image to copy the new credentials.)
./passwd.sh username password
```