docs: wipe for now
This commit is contained in:
parent
abdc955dde
commit
a2f990d65b
79
README.md
79
README.md
@ -1,84 +1,7 @@
|
||||
Parasol Static Site
|
||||
====================
|
||||
|
||||
The following starter is two container setup works well for two docker
|
||||
containers for website building and webhook listener for changes.
|
||||
|
||||
Perhaps it can be repurposed as a recipe?!
|
||||
|
||||
|
||||
|
||||
### Deploy tools with Docker
|
||||
|
||||
Docker setup to host a `hugo` static website with a `nginx` HTTP server. The website can be updated and built via an external HTTP request using `webhookd` which pulls the latest version from a .git repository.
|
||||
|
||||
## Requirements
|
||||
|
||||
* `docker`
|
||||
* `docker-compose`
|
||||
|
||||
## Deployment
|
||||
|
||||
By default the hook server listens at port `8080` while the static website is hosted on port `9090`, the `HUGO_GIT_URL` variable is set to this very repository.
|
||||
|
||||
It is recommended to use an reverse proxy to move both endpoints behind authentication, DNS, TLS etc.
|
||||
|
||||
```bash
|
||||
# Start nginx server and webhook / build server in background (-d)
|
||||
docker-compose up -d
|
||||
|
||||
# Rebuild docker files after something changed
|
||||
docker-compose up --build -d
|
||||
```
|
||||
|
||||
Do not forget to run the hook for the first time to trigger building the website. This does not happen automatically.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Trigger deploy hook via HTTP request
|
||||
curl -v -XPOST http://localhost:8080/deploy
|
||||
```
|
||||
|
||||
It is recommended to configure your webhook endpoint to be protected by HTTP Basic authentication. To call that hook generate the header like that:
|
||||
|
||||
```bash
|
||||
# Generate authentication token
|
||||
echo -n user:password | base64
|
||||
|
||||
# Trigger deploy hook via authenticated HTTP request
|
||||
curl -v XPOST -H "Authorization: Basic <insert token here>" https://hook.com/deploy
|
||||
```
|
||||
|
||||
## Private repository
|
||||
|
||||
In case you're pulling from a private repository, you need to point at the folder where the ssh keys live. For this, create an `.env` file or use the `-e` command line argument when launching docker:
|
||||
|
||||
```bash
|
||||
SSH_DIR_PATH=/home/myuser/.ssh
|
||||
```
|
||||
|
||||
You might want to adjust your configs as docker will not have write access to adjust `known_hosts` etc:
|
||||
|
||||
```
|
||||
Host codeberg.org
|
||||
StrictHostKeyChecking no
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Build docker image based on Dockerfile
|
||||
sudo docker build . -t offline
|
||||
|
||||
# Run container from this image
|
||||
sudo docker run \
|
||||
-p 8080:8080 \
|
||||
-v ./scripts:/scripts \
|
||||
-e WHD_SCRIPTS=/scripts \
|
||||
-e HUGO_GIT_URL=https://codeberg.org/offline/future \
|
||||
offline:latest
|
||||
```
|
||||
> TODO...
|
||||
|
||||
## License
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user