Update README to include Docker Swarm deployment instructions

This commit is contained in:
Christian Galo 2025-05-05 02:55:03 +00:00
parent 192fd38906
commit d0460de976

22
README
View File

@ -8,4 +8,24 @@ Serve Hugo site with Docker
```
docker run --rm -v $(pwd):/src -p 1313:1313 hugomods/hugo:base-non-root-0.145.0 server -D
```
```
## Deploying the app with Docker Swarm
Set the environment variables from the .env file during the shell session.
```
set -a && source .env && set +a
```
Set the secrets. (There aren't any secrets in this project, but this is how you would set them.)
```
printf "SECRET_HERE" | docker secret create SECRET_NAME -
```
Deploy using the `-c` flag to specify one or multiple compose files.
```
docker stack deploy wiki-cafe-site --detach=true -c compose.yaml
```