From 16f0d323b95b31e333f450ad9598160e517a84e1 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Thu, 19 Nov 2026 00:09:03 +0100 Subject: [PATCH] Production upload over FTPS (explicit TLS, no fallback) instead of plain FTP The hosting partner offers FTP over TLS after all. upload-production.sh now forces AUTH TLS (ssl-force, protect-data, protect-list), verifies the certificate and stays passive; the three rounds and the folder restrictions are unchanged. Docs, workflow comments and the lftp tests follow. Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/continuous_integration.yaml | 4 ++-- docs/cms-integration.md | 2 +- docs/deploy-and-ci.md | 6 +++--- web/deploy/upload-production.sh | 16 ++++++++++------ web/e2e/deployScripts.e2e.ts | 16 ++++++++++++---- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/continuous_integration.yaml b/.gitea/workflows/continuous_integration.yaml index d835ad9..7f549ce 100644 --- a/.gitea/workflows/continuous_integration.yaml +++ b/.gitea/workflows/continuous_integration.yaml @@ -369,13 +369,13 @@ jobs: name: dist path: web/dist - # Gewone FTP (het productiepakket biedt geen FTPS) naar de map met + # FTP over TLS (FTPS, explicit, zonder terugval) naar de map met # voorgerenderde pagina's van de CMS-host, in drie rondes (zie # deploy/upload-production.sh): eerst alles behalve HTML, dan alle HTML, # en pas daarna oude bestanden opruimen. Zo verwijst een bezoeker nooit # naar een bestand dat er nog niet staat. De host zelf en zijn web.config # komen uit de CMS-pijplijn. Deze job kan pas draaien als er een webhost is. - - name: Upload naar productie (gewone FTP) + - name: Upload naar productie (FTPS) env: FTP_HOST: ${{ secrets.PROD_HOST_ADDRESS }} FTP_PORT: ${{ secrets.PROD_HOST_PORT }} diff --git a/docs/cms-integration.md b/docs/cms-integration.md index 13790ab..45762c2 100644 --- a/docs/cms-integration.md +++ b/docs/cms-integration.md @@ -51,7 +51,7 @@ The hero of the homepage comes from the CMS hero module (`GET /api/v1/hero`); th Decision (Bryan, 2026-11-15): the hosting package has one entry per website. The CMS host (Kestrel) is that entry and serves the website itself (the prerendered pages), `/admin` and `/api/v1/*`. In production IIS (or the proxy) therefore passes **all** requests to the CMS host, not only `/api/v1/*`, and serves no static files or HTML cache of its own. This holds for the test host and for ASF production alike. - **Test (ASF):** nginx on the proxy Pi forwards everything for `test.andreaslop.nl` to the CMS host (`web/deploy/nginx/test.andreaslop.nl.proxy.conf`), which serves the site files and the API. Nothing to add. -- **Production: not in place yet.** The FTP upload (`web/deploy/upload-production.sh`) is now plain FTP into the CMS host's prerendered-pages folder and no longer puts a `web.config` on the server (the host's own `web.config` comes from the CMS pipeline). The generated `web/deploy/iis/web.config` still describes the old idea of IIS serving the files and has to change with the production hosting: IIS keeps only the redirects (www, HTTPS) and the pass-through to the CMS host, and the prerendered `dist/` goes to the CMS host's prerendered-pages folder as on test. Security headers then come from the CMS host (as on test). This is part of the production hosting work, not of the packages feature. Until then production builds use the committed snapshot and the live calls fail safely (the baked list stays; the browser console shows a 404 for the API). Change generated server files only in `web/config/serverConfig.ts` and run `pnpm server-config`. +- **Production: not in place yet.** The FTP upload (`web/deploy/upload-production.sh`) is FTPS (explicit TLS, no fallback) into the CMS host's prerendered-pages folder and no longer puts a `web.config` on the server (the host's own `web.config` comes from the CMS pipeline). The generated `web/deploy/iis/web.config` still describes the old idea of IIS serving the files and has to change with the production hosting: IIS keeps only the redirects (www, HTTPS) and the pass-through to the CMS host, and the prerendered `dist/` goes to the CMS host's prerendered-pages folder as on test. Security headers then come from the CMS host (as on test). This is part of the production hosting work, not of the packages feature. Until then production builds use the committed snapshot and the live calls fail safely (the baked list stays; the browser console shows a 404 for the API). Change generated server files only in `web/config/serverConfig.ts` and run `pnpm server-config`. - **Host injection (built in the site; the host side is the CMS repo's work):** the build leaves markers in the prerendered pages and the CMS host fills them from live data, so a CMS change is visible to search engines at once without a rebuild. Contract and plan: `aidlc-docs/features/asf-cms-host-injection/plan.md`; golden files for the list HTML: `web/contract/host-injection/`. - Markers: `` + `