Add docker image
This commit is contained in:
17
README.md
17
README.md
@ -3,4 +3,19 @@ PagesServer is a very lightweight static web server that offer two main features
|
||||
* Serve static content
|
||||
* Allow easy update of the whole website from a CI/CD system through a POST request, protected by a token & by IP filtering.
|
||||
|
||||
This project has been written in Rust. It is based on the Actix framework.
|
||||
This project has been written in Rust. It is based on the Actix framework.
|
||||
|
||||
## Publishing / updating website
|
||||
Make a
|
||||
* `POST` request on `http://<website>/_mgmt/replace_files`.
|
||||
* Body:
|
||||
* Multipart / Form-data body
|
||||
* One field: `file` that contains a TAR archive of the website to publish
|
||||
* Headers:
|
||||
* `Token` (mandatory) : contains the push token that allow to post files
|
||||
* `BaseURI` (optional) : defines the directory inside the tar archive to extract to storage directory
|
||||
|
||||
## Try it
|
||||
```bash
|
||||
docker run --rm -ti -p 8000:8000 -v $(pwd)/storage:/srv/web --env UPDATE_TOKEN=CHANGEME pierre42100/pages_server
|
||||
```
|
Reference in New Issue
Block a user