Add platform infrastructure configuration

This commit is contained in:
donghyeon-ka
2026-08-28 17:35:41 +09:00
parent fa76531e5b
commit 16c337bcc9
302 changed files with 83259 additions and 1 deletions
@@ -0,0 +1,94 @@
# Candidate configuration for /etc/nginx/sites-available/learn-services.
#
# This file is source-controlled configuration, not the active host configuration.
# Review the accompanying README before installing it.
map $http_upgrade $gitea_connection_upgrade {
default upgrade;
'' close;
}
# Do not let an unknown TLS hostname fall through to the first named virtual
# host. Nginx can reject the handshake without presenting either certificate.
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server ipv6only=on;
ssl_reject_handshake on;
}
server {
server_name git.learn.hyeonworks.com;
# TLS terminates here. The hop to the k3s Traefik web NodePort is HTTP.
location / {
proxy_pass http://127.0.0.1:30080;
proxy_http_version 1.1;
# Replace all externally supplied forwarding headers at the trust boundary.
proxy_set_header Host git.learn.hyeonworks.com;
proxy_set_header X-Forwarded-Host git.learn.hyeonworks.com;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
# Keep Git operations and WebSocket-capable endpoints streaming.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $gitea_connection_upgrade;
proxy_request_buffering off;
proxy_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_redirect off;
client_max_body_size 512m;
}
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/git.learn.hyeonworks.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/git.learn.hyeonworks.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# Keycloak is intentionally left on its current static response until its phase.
server {
server_name id.learn.hyeonworks.com;
location / {
default_type text/plain;
return 200 "Keycloak domain reached Nginx successfully\n";
}
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/git.learn.hyeonworks.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/git.learn.hyeonworks.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = git.learn.hyeonworks.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name git.learn.hyeonworks.com;
return 404; # managed by Certbot
}
server {
if ($host = id.learn.hyeonworks.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name id.learn.hyeonworks.com;
return 404; # managed by Certbot
}