From aeba66d138ccdd3773f13a56761bf6ee4c00bf41 Mon Sep 17 00:00:00 2001 From: Beda Schmid Date: Thu, 29 Oct 2026 17:28:09 +0000 Subject: [PATCH] Replace DynamicPress with remote-source image build --- .gitignore | 1 - README.md | 20 ++++++++++---------- docker-compose.yml | 27 +++++++++++++-------------- dynamicpress.conf | 12 ------------ 4 files changed, 23 insertions(+), 37 deletions(-) delete mode 100644 dynamicpress.conf diff --git a/.gitignore b/.gitignore index 189eb19..7903bc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .env .env.* -!.env.example .DS_Store *.log *.key diff --git a/README.md b/README.md index 1349a75..c1f278c 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ # DynamicPress -DynamicPress serves the static website at https://dynamicpress.org using nginx. +DynamicPress serves its static website through unprivileged nginx, with the website assembled from private source during image build. ## Deployment layout - **Compose:** `/srv/docker/dynamicpress/docker-compose.yml` -- **Static configuration/source:** `/srv/docker/dynamicpress/dynamicpress.conf`; deployed HTML is stored separately, and its authoritative source repository remains unconfirmed -- **Non-secret environment:** none -- **Secrets:** none declared by this deployment -- **NVMe application state:** `/srv/appdata/dynamicpress/www`, containing the deployed website and mounted read-only at `/var/www/html` +- **Static configuration/source:** deployment configuration under `/srv/docker/dynamicpress`; application source, Dockerfile, and nginx configuration from `ssh://git@git.yoonect.com:2222/DynamicPress/dynamicpress-website.git`, branch `master` +- **Non-secret environment:** none declared in Compose +- **Secrets:** none at runtime; private Git builds authenticate through the operator's SSH agent +- **NVMe application state:** none - **Bulk HDD data:** none -- **Other mounts:** none +- **Other mounts:** disposable 16 MiB `/tmp` tmpfs -Secrets are never committed to this repository. TLS is handled outside this container by the existing reverse proxy. +Secrets are never committed to this repository. SSH-agent forwarding is used only for builds; TLS is handled by the existing reverse proxy. ## Dependencies and recovery -- **Networks/dependencies:** external `npm_proxy`, fixed address `192.168.99.14`, existing reverse proxy and DNS for dynamicpress.org -- **Back up:** `/srv/appdata/dynamicpress/www` and the deployment repository; the deployed HTML must be preserved until its authoritative source and recovery process are established -- **Re-creatable:** the nginx image; the custom website cannot be recovered from that image +- **Networks/dependencies:** external `npm_proxy`, fixed address `192.168.99.14`, HTTP port `8080`, existing reverse proxy and DNS for dynamicpress.org; no host-published ports. Builds require authenticated Git access and Python/nginx base images; the site generator uses Python's standard library. The image supplies a `/healthz` healthcheck. +- **Back up:** deployment and private application repositories; the owner explicitly declined a backup of the replaced website +- **Re-creatable:** image `dynamicpress-website:latest`, container, generated website, and temporary files; rebuild from remote `master` with SSH forwarding and Bake permission `--allow=ssh`, retaining source revisions/image IDs for release tracking diff --git a/docker-compose.yml b/docker-compose.yml index e0bb395..8e36a0e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,22 +2,21 @@ name: dynamicpress services: dynamicpress: - image: nginx:alpine + image: dynamicpress-website:latest + pull_policy: never + build: + context: ssh://git@git.yoonect.com:2222/DynamicPress/dynamicpress-website.git#master + ssh: + - default container_name: dynamicpress restart: unless-stopped - volumes: - - type: bind - source: /srv/appdata/dynamicpress/www - target: /var/www/html - read_only: true - bind: - create_host_path: false - - type: bind - source: /srv/docker/dynamicpress/dynamicpress.conf - target: /etc/nginx/conf.d/default.conf - read_only: true - bind: - create_host_path: false + read_only: true + tmpfs: + - /tmp:size=16m + cap_drop: + - ALL + security_opt: + - no-new-privileges:true networks: npm_proxy: ipv4_address: 192.168.99.14 diff --git a/dynamicpress.conf b/dynamicpress.conf deleted file mode 100644 index f051eff..0000000 --- a/dynamicpress.conf +++ /dev/null @@ -1,12 +0,0 @@ -server { - listen 80; - server_name dynamicpress.org; - root /var/www/html; - index index.html; - location / { - try_files $uri $uri/ /index.html?$query_string; - } - location ~ /\.ht { - deny all; - } -}