Merge the four independent gateway-gamers.net site repos (40k-rankings, aos-rankings, kingmaker, scouting) into one monorepo under sites/, preserving each site's full commit history via a manual subtree-style merge (git-subtree isn't available in this environment). - shared/: header.template.html (nav swapped in per site), footer.html, and images/ — previously byte-identical copies duplicated 4x (~100MB). - Each site's public/footer.html and public/images are now symlinks into shared/; public/header.html is generated at predev/prebuild time from shared/header.template.html + the site's own nav.html, so nav bars stay individual while everything else about the header is shared. - Single root .gitlab-ci.yml with path-scoped build/deploy jobs per site plus a deploy:shared job, replacing the 4 separate per-repo pipelines. - nginx confs (kept per-site as reference, same as before) gain location /images/ and location = /footer.html alias blocks pointing at a shared webserver directory, so the deployed site no longer duplicates the images either — see README.md for the full layout and the runbook for applying this on the webserver. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name 40k-rankings.gateway-gamers.net;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name 40k-rankings.gateway-gamers.net;
|
|
|
|
root /var/www/domains/gateway-gamers.net/40k-rankings;
|
|
index index.html;
|
|
|
|
# SSL — managed by Certbot
|
|
# ssl_certificate /etc/letsencrypt/live/40k-rankings.gateway-gamers.net/fullchain.pem;
|
|
# ssl_certificate_key /etc/letsencrypt/live/40k-rankings.gateway-gamers.net/privkey.pem;
|
|
# include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
# Hide nginx version
|
|
server_tokens off;
|
|
|
|
# Security headers
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; connect-src 'self' https://newprod-api.bestcoastpairings.com; img-src 'self' data:;" always;
|
|
|
|
# Shared assets (images + footer) — single on-disk copy under shared/,
|
|
# deployed once and aliased by every gateway-gamers.net site.
|
|
location /images/ {
|
|
alias /var/www/domains/gateway-gamers.net/shared/images/;
|
|
}
|
|
|
|
location = /footer.html {
|
|
alias /var/www/domains/gateway-gamers.net/shared/footer.html;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|