Compare commits
2 Commits
1cd7625220
...
bb9f2ae3ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb9f2ae3ce | ||
|
|
dc947165a4 |
46
docker-30/lab-proxy/nginx.conf
Normal file
46
docker-30/lab-proxy/nginx.conf
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# nginx.conf
|
||||||
|
|
||||||
|
error_log /dev/stderr;
|
||||||
|
|
||||||
|
http {
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 9080;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://192.168.0.35:80;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log_format detailed '$remote_addr - [$time_local] '
|
||||||
|
'"$request_method $host$request_uri" '
|
||||||
|
'$status $body_bytes_sent '
|
||||||
|
'"$http_referer" "$http_user_agent"';
|
||||||
|
|
||||||
|
access_log /dev/stdout detailed;
|
||||||
|
}
|
||||||
|
|
||||||
|
stream {
|
||||||
|
# Stream doesn't log by default, enable explicitly:
|
||||||
|
log_format stream_log '$remote_addr [$time_local] '
|
||||||
|
'$protocol $ssl_preread_server_name '
|
||||||
|
'$status $bytes_sent $bytes_received $session_time';
|
||||||
|
|
||||||
|
access_log /dev/stdout stream_log;
|
||||||
|
|
||||||
|
# Nginx ingress in kubernetes
|
||||||
|
server {
|
||||||
|
listen 9443;
|
||||||
|
proxy_pass 192.168.0.35:443;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gateway provided by cilium/envoy
|
||||||
|
server {
|
||||||
|
listen 9444;
|
||||||
|
proxy_pass 192.168.0.36:443;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
events {}
|
||||||
9
docker-30/lab-proxy/run.sh
Normal file
9
docker-30/lab-proxy/run.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
docker rm -f lab-proxy || /usr/bin/true
|
||||||
|
|
||||||
|
docker run -d --name lab-proxy \
|
||||||
|
--restart unless-stopped \
|
||||||
|
-v /srv/docker/lab-proxy/nginx.conf:/etc/nginx/nginx.conf:ro \
|
||||||
|
-p 9443:9443 \
|
||||||
|
-p 9444:9444 \
|
||||||
|
-p 9080:9080 \
|
||||||
|
nginx:alpine
|
||||||
9
docker-30/maru-hleda-byt/run.sh
Normal file
9
docker-30/maru-hleda-byt/run.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker rm -f maru-hleda-byt
|
||||||
|
|
||||||
|
# gitea registry login with kacerr / token
|
||||||
|
docker run -d --name maru-hleda-byt \
|
||||||
|
-p 8080:8080 \
|
||||||
|
-v /srv/maru-hleda-byt/data:/app/data \
|
||||||
|
gitea.home.hrajfrisbee.cz/littlemeat/maru-hleda-byt:0.01
|
||||||
22
docker-30/nginx/001-gitea.conf
Normal file
22
docker-30/nginx/001-gitea.conf
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name gitea.home.hrajfrisbee.cz;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/gitea.home.hrajfrisbee.cz/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/gitea.home.hrajfrisbee.cz/privkey.pem;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
|
||||||
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://192.168.0.30:3000;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gitea Git over HTTP
|
||||||
|
client_max_body_size 512m;
|
||||||
|
}
|
||||||
35
docker-30/nginx/002-jellyfin.conf
Normal file
35
docker-30/nginx/002-jellyfin.conf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name jellyfin.home.hrajfrisbee.cz;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/gitea.home.hrajfrisbee.cz/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/gitea.home.hrajfrisbee.cz/privkey.pem;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
|
||||||
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
|
|
||||||
|
# Security headers for media streaming
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
|
||||||
|
# Increase body size for high-res movie posters
|
||||||
|
client_max_body_size 20M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# Proxy to your Synology or VM IP and Jellyfin port (default 8096)
|
||||||
|
proxy_pass http://192.168.0.2:8096;
|
||||||
|
|
||||||
|
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 X-Forwarded-Protocol $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
|
|
||||||
|
# Disable buffering for smoother streaming
|
||||||
|
proxy_buffering off;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,10 +29,10 @@ log "Backup size: ${BACKUP_SIZE} bytes"
|
|||||||
# --- Upload to MinIO ---
|
# --- Upload to MinIO ---
|
||||||
log "Uploading to ${MC_ALIAS}/${S3_BUCKET}..."
|
log "Uploading to ${MC_ALIAS}/${S3_BUCKET}..."
|
||||||
set -x
|
set -x
|
||||||
mc cp --quiet "${BACKUP_FILE}" "${MC_ALIAS}/${S3_BUCKET}/vault-backup-${TIMESTAMP}.tar.gz"
|
minio-cli cp --quiet "${BACKUP_FILE}" "${MC_ALIAS}/${S3_BUCKET}/vault-backup-${TIMESTAMP}.tar.gz"
|
||||||
|
|
||||||
# --- Prune old backups ---
|
# --- Prune old backups ---
|
||||||
log "Pruning backups older than ${RETENTION_DAYS} days..."
|
log "Pruning backups older than ${RETENTION_DAYS} days..."
|
||||||
mc rm --quiet --recursive --force --older-than "${RETENTION_DAYS}d" "${MC_ALIAS}/${S3_BUCKET}/"
|
minio-cli rm --quiet --recursive --force --older-than "${RETENTION_DAYS}d" "${MC_ALIAS}/${S3_BUCKET}/"
|
||||||
|
|
||||||
log "Backup complete: vault-backup-${TIMESTAMP}.tar.gz"
|
log "Backup complete: vault-backup-${TIMESTAMP}.tar.gz"
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: ghost-on-kubernetes-redirect
|
||||||
|
namespace: ghost-on-kubernetes
|
||||||
|
labels:
|
||||||
|
app: ghost-on-kubernetes
|
||||||
|
app.kubernetes.io/name: ghost-on-kubernetes-httproute
|
||||||
|
app.kubernetes.io/instance: ghost-on-kubernetes
|
||||||
|
app.kubernetes.io/version: '6.0'
|
||||||
|
app.kubernetes.io/component: httproute
|
||||||
|
app.kubernetes.io/part-of: ghost-on-kubernetes
|
||||||
|
spec:
|
||||||
|
parentRefs:
|
||||||
|
- name: cilium-gateway
|
||||||
|
namespace: kube-system
|
||||||
|
sectionName: http
|
||||||
|
hostnames:
|
||||||
|
- ghost.lab.home.hrajfrisbee.cz
|
||||||
|
rules:
|
||||||
|
- matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
|
filters:
|
||||||
|
- type: RequestRedirect
|
||||||
|
requestRedirect:
|
||||||
|
scheme: https
|
||||||
|
statusCode: 301
|
||||||
@@ -15,6 +15,7 @@ spec:
|
|||||||
parentRefs:
|
parentRefs:
|
||||||
- name: cilium-gateway
|
- name: cilium-gateway
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
|
sectionName: lab-home-hrajfrisbee-https-wildcard
|
||||||
hostnames:
|
hostnames:
|
||||||
- ghost.lab.home.hrajfrisbee.cz
|
- ghost.lab.home.hrajfrisbee.cz
|
||||||
rules:
|
rules:
|
||||||
@@ -24,4 +25,5 @@ spec:
|
|||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: ghost-on-kubernetes-service
|
- name: ghost-on-kubernetes-service
|
||||||
|
namespace: ghost-on-kubernetes
|
||||||
port: 2368
|
port: 2368
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: ImplementationSpecific
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: ghost-on-kubernetes-service
|
name: ghost-on-kubernetes-service
|
||||||
|
|||||||
Reference in New Issue
Block a user