67b07634ae
- app/: Emdash scaffold (Astro 6, node target) with cmses/plugins/pages collections - app/seed/seed.json: WordPress→Emdash parity for kotkanagrilli.fi (~30 entries) - Dockerfile + docker/entrypoint.sh: multi-stage build, single PVC at /app/state - deploy/helm/: chart mirroring emdash-kotkanagrilli (single-replica, sqlite, kotkan) - deploy/fleet-overlay/: HelmRelease/source/image-automation templates for anton-helm-workloads (staging + production) - .woodpecker/container.yaml: arm64 build, three OCI tags per push (immutable 0.1.<pipeline> + floating <branch> + <branch>-latest) - .ddev/: local dev with nginx proxy to emdash on :4321 - README/DEPLOYMENT/ARCHITECTURE/CLAUDE: docs covering the three-repo pipeline (cms-plugins + anton-helm-workloads + Gitea OCI registry)
50 lines
1.5 KiB
Bash
Executable File
50 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Runs in DDEV's web container after start.sh has copied
|
|
# /mnt/ddev_config/nginx_full/ → /etc/nginx/sites-enabled/, but before
|
|
# supervisord boots nginx. We rewrite the generated site config to
|
|
# reverse-proxy everything to the emdash service.
|
|
set -eu
|
|
|
|
cat > /etc/nginx/sites-enabled/nginx-site.conf <<'NGINX'
|
|
# Forward `Connection: upgrade` only when the client is actually
|
|
# upgrading (Vite's HMR WebSocket lives at wss://<host>/?token=...).
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen 443 ssl default_server;
|
|
|
|
ssl_certificate /etc/ssl/certs/master.crt;
|
|
ssl_certificate_key /etc/ssl/certs/master.key;
|
|
|
|
include /etc/nginx/monitoring.conf;
|
|
|
|
sendfile off;
|
|
error_log /dev/stdout info;
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
proxy_buffering off;
|
|
proxy_http_version 1.1;
|
|
client_max_body_size 100m;
|
|
|
|
location / {
|
|
proxy_pass http://ddev-cms-plugins-emdash:4321;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_read_timeout 86400s;
|
|
proxy_send_timeout 86400s;
|
|
}
|
|
}
|
|
NGINX
|
|
|
|
rm -f /etc/nginx/sites-enabled/seconddocroot.conf.example \
|
|
/etc/nginx/sites-enabled/README.nginx_full.txt \
|
|
/etc/nginx/conf.d/connection-upgrade.conf
|