Convert to docker compose

This commit is contained in:
Brad Treloar 2025-09-03 23:32:03 +09:30
parent 82348ddc7c
commit 86fc7ca259
5 changed files with 22 additions and 48 deletions

View file

@ -2,7 +2,7 @@
## Set up hugo and build HTML
````bash
```bash
# Install hugo.
sudo apt install hugo
@ -11,27 +11,22 @@ cd hugo
hugo
```
## Build and run server
## Prepare and run server
```bash
# Set access credentials.
./passwd.sh username password
# Build/rebuild the image.
docker build --no-cache -t notes-server .
# Run the service.
docker compose up -d
```
# Run the image, listening on port 42069.
docker run -d \
--name notes-server \
-v "/var/www/html/notes/hugo/public:/usr/share/nginx/html" \
-p 42069:80 \
notes-server
````
## Auth credentials setup
## Changing the login credentials
```bash
# Overwrite the htpasswd file with new user credentials.
# (Rebuild the image to copy the new credentials.)
./passwd.sh username password
# (Rebuild the image to copy the new credentials.)
docker compose down && docker compose up -d --build
```