Convert to docker compose
This commit is contained in:
parent
82348ddc7c
commit
86fc7ca259
5 changed files with 22 additions and 48 deletions
23
README.md
23
README.md
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue