From e59e6943638b86fe5e8a855d3de5bacf9bfbe424 Mon Sep 17 00:00:00 2001 From: mifi Date: Tue, 14 Jul 2026 00:02:16 -0300 Subject: [PATCH] Updates to work around cloudflare tunnel --- .woodpecker/build.yaml | 2 +- .woodpecker/deploy.yaml | 2 +- AGENTS.md | 1 + README.md | 18 ++++++++++-------- .../docker-compose.yml | 2 ++ package.json | 4 ++-- 6 files changed, 17 insertions(+), 12 deletions(-) rename docker-compose.yml => deploy/docker-compose.yml (88%) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index b71309e..d56a4aa 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -1,4 +1,4 @@ -# Deploy: build image, push to registry, trigger Portainer stack redeploy. +# Build: site + Docker image, push to registry (deploy workflow triggers Dockhand). # Runs on push/tag/manual to main only, after ci workflow succeeds. when: - branch: main diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml index bea4d64..f938cfa 100644 --- a/.woodpecker/deploy.yaml +++ b/.woodpecker/deploy.yaml @@ -1,4 +1,4 @@ -# Deploy: build image, push to registry, trigger Portainer stack redeploy. +# Deploy: after image push, trigger Dockhand stack redeploy. # Runs on push/tag/manual to main only, after ci workflow succeeds. skip_clone: true # Use writable workspace when clone is skipped (no root clone step to create /woodpecker/src) diff --git a/AGENTS.md b/AGENTS.md index 3f7ea75..e05f9e1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,6 +21,7 @@ This file helps LLM agents work with the Armandine codebase without introducing | Static assets (favicons, media files) | `static/assets/` (media: `desktop/`, `tablet/`, `mobile/`, `thumbnail/`, `videos/`) | | Global CSS | `src/app.css` (imported in `+layout.svelte`) | | Config | `svelte.config.js`, `vite.config.ts`, `tsconfig.json`, `postcss.config.js` | +| Runtime compose (Dockhand) | `deploy/docker-compose.yml` only — keep this directory free of media/site assets so Hawser sync stays small | ## Conventions diff --git a/README.md b/README.md index 10c7633..472a8a9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Pre-rendered Svelte gallery site served by Nginx. Build outputs to `build/`; ima - **CSS:** PostCSS (nesting + level 2), component-scoped styles; critical CSS inlined at build time with Beasties. - **Runtime:** `nginx:alpine` (see `Dockerfile`) serves the contents of `build/`. - **Registry:** Gitea at `git.mifi.dev` → image `git.mifi.dev/mifi-holdings/armandine`. -- **Deploy:** Portainer on Linode; stack uses this image (no volume for site content). +- **Deploy:** Dockhand git stack from `deploy/docker-compose.yml`; stack uses this image (no volume for site content). ## Local development @@ -71,7 +71,7 @@ Ports: ```bash pnpm docker:push ``` - Then on the server, redeploy the stack (e.g. Portainer “Pull and redeploy” or your webhook). + Then on the server, redeploy the stack (e.g. Dockhand sync/redeploy or your webhook). ## Woodpecker CI/CD @@ -81,7 +81,7 @@ Three pipelines (see `.woodpecker/`): |----------|------|------| | **ci** | Every push to `main`, every PR | Lint (ESLint + Stylelint), Prettier check, Svelte/TypeScript check | | **build**| Push/tag/manual on `main` only (after ci) | Build site to `build/`, build Docker image, push to `git.mifi.dev/mifi-holdings/armandine` | -| **deploy** | After build | Trigger Portainer stack redeploy via webhook | +| **deploy** | After build | Trigger Dockhand stack redeploy via webhook | Order: **ci** → **build** → **deploy**. @@ -91,14 +91,15 @@ Configure in the repo’s Woodpecker secrets: - `gitea_registry_username` – Gitea user for registry login - `gitea_package_token` – Gitea token with package read/write -- `portainer_webhook_url` – Portainer stack webhook URL for redeploy +- `dockhand_webhook_url` – Dockhand stack webhook URL for redeploy - Mattermost/Discord webhook secrets (see `.woodpecker/*.yaml` for notifications) -## Server / Portainer +## Server / Dockhand -- Stack is defined by `docker-compose.yml` in this repo. +- Runtime stack lives in `deploy/docker-compose.yml` only (thin git-stack context so Dockhand/Hawser does not sync `static/` media). +- In Dockhand, set compose path to `deploy/docker-compose.yml` and leave **Context directory** empty (or `deploy`) — do not set context to `.`. - Compose uses the image from the registry (`git.mifi.dev/mifi-holdings/armandine:latest`); no volume for site content (it’s inside the image). -- Ensure the server can pull from `git.mifi.dev`. After a push, either let the deploy pipeline trigger the Portainer webhook or manually “Pull and redeploy” the stack. +- Ensure the server can pull from `git.mifi.dev`. After a push, either let the deploy pipeline trigger the Dockhand webhook or manually sync/redeploy the stack. ## Project layout @@ -127,7 +128,8 @@ Configure in the repo’s Woodpecker secrets: │ └── critical-css.js # Beasties post-step on build/ ├── build/ # Output of pnpm build (Vite + Beasties) ├── Dockerfile # nginx:alpine + COPY build/ -├── docker-compose.yml +├── deploy/ +│ └── docker-compose.yml # Thin Dockhand/Hawser runtime stack only ├── package.json # Scripts: dev, build, preview, check, lint, format ├── .devcontainer/ ├── .woodpecker/ diff --git a/docker-compose.yml b/deploy/docker-compose.yml similarity index 88% rename from docker-compose.yml rename to deploy/docker-compose.yml index fdf3a01..8a7e308 100644 --- a/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -1,3 +1,5 @@ +# Thin deploy context for Dockhand/Hawser. +# Keep only runtime compose here so git-stack sync does not ship static/media. services: mifi-holdings-armandine-gallery: image: git.mifi.dev/mifi-holdings/armandine:latest diff --git a/package.json b/package.json index 654d637..d89a464 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,11 @@ "lint": "pnpm run lint:yaml && pnpm run lint:js && pnpm run lint:css", "lint:css": "stylelint \"src/**/*.css\"", "lint:js": "eslint src/", - "lint:yaml": "yamllint .woodpecker/ci.yaml .woodpecker/build.yaml .woodpecker/deploy.yaml docker-compose.yml", + "lint:yaml": "yamllint .woodpecker/ci.yaml .woodpecker/build.yaml .woodpecker/deploy.yaml deploy/docker-compose.yml", "lint:fix": "pnpm run lint:fix:js && pnpm run lint:fix:css && pnpm run lint:fix:yaml", "lint:fix:js": "eslint src/ --fix", "lint:fix:css": "stylelint \"src/**/*.css\" --fix", - "lint:fix:yaml": "yamllint .woodpecker/ci.yaml .woodpecker/build.yaml .woodpecker/deploy.yaml docker-compose.yml --fix", + "lint:fix:yaml": "yamllint .woodpecker/ci.yaml .woodpecker/build.yaml .woodpecker/deploy.yaml deploy/docker-compose.yml --fix", "docker:build": "docker build --platform linux/amd64 -t git.mifi.dev/mifi-holdings/armandine:latest .", "docker:push": "docker push git.mifi.dev/mifi-holdings/armandine:latest" },