From 1f087581d4eace39e4f848aa725156c3fb7ed3de Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Wed, 18 Nov 2026 21:17:04 +0100 Subject: [PATCH] Production upload: plain FTP (no FTPS), no web.config from this repo, optional port The production package only offers plain FTP. The upload goes into the prerendered-pages folder of the CMS host; the host and its web.config come from the CMS pipeline. Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/continuous_integration.yaml | 14 +++-- docs/cms-integration.md | 2 +- docs/deploy-and-ci.md | 4 ++ web/deploy/upload-production.sh | 34 +++++++---- web/e2e/deployScripts.e2e.ts | 64 ++++++++++++++++---- 5 files changed, 85 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/continuous_integration.yaml b/.gitea/workflows/continuous_integration.yaml index 53e298a..d835ad9 100644 --- a/.gitea/workflows/continuous_integration.yaml +++ b/.gitea/workflows/continuous_integration.yaml @@ -369,14 +369,16 @@ jobs: name: dist path: web/dist - # FTP met TLS (verplicht) naar de webhoster, in drie rondes (zie - # deploy/upload-production.sh): eerst alles behalve HTML en web.config, - # dan web.config en alle HTML, en pas daarna oude bestanden opruimen. Zo - # verwijst een bezoeker nooit naar een bestand dat er nog niet staat. - # Deze job kan pas draaien als er een webhost is. - - name: Upload naar productie (FTPS) + # Gewone FTP (het productiepakket biedt geen FTPS) 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) env: FTP_HOST: ${{ secrets.PROD_HOST_ADDRESS }} + FTP_PORT: ${{ secrets.PROD_HOST_PORT }} FTP_USER: ${{ secrets.PROD_HOST_USERNAME }} LFTP_PASSWORD: ${{ secrets.PROD_HOST_PASSWORD }} FTP_DIR: ${{ vars.PROD_DEPLOY_PATH || 'wwwroot' }} diff --git a/docs/cms-integration.md b/docs/cms-integration.md index 1c7bbf7..13790ab 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 generated `web/deploy/iis/web.config` and the FTP upload of static files (`web/deploy/upload-production.sh`) still describe the old idea of IIS serving the files. They have 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 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`. - **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: `` + `