From ec21aead672e5b1e1423c7aafa041306287211d1 Mon Sep 17 00:00:00 2001 From: klemek Date: Tue, 14 Apr 2026 00:07:27 +0200 Subject: [PATCH] feat: sample docker compose --- .env.example | 3 +++ .gitignore | 5 ++++- README.md | 2 +- docker-compose.example.yml | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .env.example create mode 100644 docker-compose.example.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..49fb701 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +HOST=example.com +TOKEN=secret +PORT=443 \ No newline at end of file diff --git a/.gitignore b/.gitignore index b0014ed..e6921a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ .venv .vscode -.ruff_cache \ No newline at end of file +.ruff_cache +docker-compose.yml +.env +letsencrypt \ No newline at end of file diff --git a/README.md b/README.md index 4d9a74a..9b0c762 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ curl -X DELETE \ - [x] [http.server security](https://docs.python.org/3/library/http.server.html#http-server-security) - [ ] launch separate upgrade 80->443 server when https - [ ] token management with "generate" command and bind path to specific token -- [ ] docker compose example + .env +- [x] docker compose example + .env - [ ] proper doc ### Makefile targets diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 0000000..089e5b4 --- /dev/null +++ b/docker-compose.example.yml @@ -0,0 +1,15 @@ +name: stapler + +services: + stapler: + build: . + restart: unless-stopped + ports: + - "${PORT}:8080" + volumes: + - "./data:/data" + - "./letsencrypt:/etc/letsencrypt" + environment: + - HOST=${HOST} + - TOKEN=${TOKEN} + command: run