Voeg thematische kleurplaten en creatieve niveaus toe (v0.4.65-beta) #3

Open
bes-r wants to merge 207 commits from bes-r/kleurplaten-v0-4-65 into main AGit
5 changed files with 11 additions and 10 deletions
Showing only changes of commit 6097d7c9f1 - Show all commits

View file

@ -36,8 +36,8 @@ App op http://localhost:3000, healthcheck op `/healthz`, DB-check op `/readyz`.
- **Forgejo container registry**: CI bouwt de image één keer en pusht die; beide - **Forgejo container registry**: CI bouwt de image één keer en pusht die; beide
VM's pullen exact dezelfde geteste image. Geen build op de productie-VM. VM's pullen exact dezelfde geteste image. Geen build op de productie-VM.
- **Pangolin/Traefik verzorgt de publieke HTTPS-ingang**. De meegeleverde nginx - **Pangolin/Traefik verzorgt de publieke HTTPS-ingang**. De meegeleverde nginx
vormt de interne proxylaag en is standaard alleen via `127.0.0.1:8081` vormt de interne proxylaag en luistert standaard op poort `8081`, zodat de
bereikbaar. De Fastify-app vertrouwt precies twee proxy-hops. Pangolin/Traefik-route deze via het VM-/containernetwerk kan bereiken. De Fastify-app vertrouwt precies twee proxy-hops.
## Eenmalige setup ## Eenmalige setup
@ -108,7 +108,7 @@ POSTGRES_USER=teach
POSTGRES_PASSWORD=<sterk-wachtwoord> POSTGRES_PASSWORD=<sterk-wachtwoord>
DATABASE_URL=postgres://teach:<sterk-wachtwoord>@db:5432/teach DATABASE_URL=postgres://teach:<sterk-wachtwoord>@db:5432/teach
APP_PORT=3000 APP_PORT=3000
WEB_BIND_IP=127.0.0.1 WEB_BIND_IP=0.0.0.0
WEB_PORT=8081 WEB_PORT=8081
TRUST_PROXY_HOPS=2 TRUST_PROXY_HOPS=2
SUPER_USER=beheerder SUPER_USER=beheerder
@ -120,11 +120,11 @@ CI werkt bij elke deploy de `IMAGE=`-regel bij, pullt en herstart.
### 4. Pangolin/Traefik publiceren ### 4. Pangolin/Traefik publiceren
Publiceer `http://127.0.0.1:8081` via Pangolin/Traefik en laat daar TLS Publiceer `http://<interne-vm-ip>:8081` via Pangolin/Traefik en laat daar TLS
beëindigen. De interne nginx behoudt `X-Forwarded-Proto: https`, waarna de app beëindigen. De interne nginx behoudt `X-Forwarded-Proto: https`, waarna de app
Secure/HttpOnly/SameSite-cookies, HSTS en overige securityheaders gebruikt. Secure/HttpOnly/SameSite-cookies, HSTS en overige securityheaders gebruikt.
- Laat poort 8081 niet rechtstreeks vanaf internet of het LAN benaderbaar zijn. - Beperk poort 8081 met de hostfirewall tot het Pangolin/Traefik- of tunnelnetwerk.
- Pas `TRUST_PROXY_HOPS` alleen aan wanneer de proxyketen werkelijk verandert. - Pas `TRUST_PROXY_HOPS` alleen aan wanneer de proxyketen werkelijk verandert.
- Bij een aparte Traefik-container kan een gedeeld intern Docker-netwerk nodig - Bij een aparte Traefik-container kan een gedeeld intern Docker-netwerk nodig
zijn; zet `WEB_BIND_IP` niet ruimer dan noodzakelijk. zijn; zet `WEB_BIND_IP` niet ruimer dan noodzakelijk.

View file

@ -1 +1 @@
0.3.05-beta 0.3.06-beta

View file

@ -35,8 +35,9 @@ services:
depends_on: depends_on:
- app - app
ports: ports:
# Alleen lokaal bereikbaar; Pangolin/Traefik publiceert deze endpoint met TLS. # Bereikbaar voor Pangolin/Traefik via het VM-/containernetwerk.
- "${WEB_BIND_IP:-127.0.0.1}:${WEB_PORT:-8081}:80" # Beperk poort 8081 met de hostfirewall tot de proxy/tunnel.
- "${WEB_BIND_IP:-0.0.0.0}:${WEB_PORT:-8081}:80"
volumes: volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
restart: unless-stopped restart: unless-stopped

View file

@ -2,7 +2,7 @@
"use strict"; "use strict";
/* version shown until /api/version resolves (or if the fetch fails, e.g. offline). /* version shown until /api/version resolves (or if the fetch fails, e.g. offline).
Kept in sync by hand with the VERSION file at the repo root on every release. */ Kept in sync by hand with the VERSION file at the repo root on every release. */
const VERSION = "0.3.05-beta"; const VERSION = "0.3.06-beta";
(function(){ (function(){
const tag = document.getElementById("verTag"); const tag = document.getElementById("verTag");
tag.textContent = "v"+VERSION; tag.textContent = "v"+VERSION;

View file

@ -6,7 +6,7 @@ test('productieconfig gebruikt secure cookies en begrensde proxy trust', async (
const compose = await readFile('deploy/compose.deploy.yaml', 'utf8'); const compose = await readFile('deploy/compose.deploy.yaml', 'utf8');
assert.match(compose, /COOKIE_SECURE: "true"/); assert.match(compose, /COOKIE_SECURE: "true"/);
assert.match(compose, /TRUST_PROXY_HOPS:/); assert.match(compose, /TRUST_PROXY_HOPS:/);
assert.match(compose, /WEB_BIND_IP:-127\.0\.0\.1/); assert.match(compose, /WEB_BIND_IP:-0\.0\.0\.0/);
}); });
test('nginx behoudt het publieke forwarded protocol', async () => { test('nginx behoudt het publieke forwarded protocol', async () => {