Lightweight pages server.
Go to file
2024-05-10 00:27:38 +00:00
src cargo clippy & cargo fmt 2022-04-03 14:31:57 +02:00
.gitignore Add docker image 2022-03-27 18:29:26 +02:00
build_docker.sh Add docker image 2022-03-27 18:29:26 +02:00
Cargo.lock Update Rust crate tar to v0.4.40 2024-05-10 00:27:38 +00:00
Cargo.toml Update Rust crate clap to 3.1.18 2022-05-12 00:16:39 +00:00
Dockerfile Add docker image 2022-03-27 18:29:26 +02:00
LICENSE Add README & license 2022-03-27 18:14:09 +02:00
README.md Add docker image 2022-03-27 18:29:26 +02:00
renovate.json Add renovate.json 2022-03-30 00:13:35 +00:00

Pages Server

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.

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

docker run --rm -ti -p 8000:8000 -v $(pwd)/storage:/srv/web --env UPDATE_TOKEN=CHANGEME pierre42100/pages_server