- Add nginx deployments for static sites (dashboard, homepage, argentinamusic, humansconnect) - Configure hostPath volumes to match existing GitHub Actions rsync targets - Fix filestash service name mismatch (was incorrectly named filebrowser) - Add static sites to ingress with SSL support - Add shared nginx config for SPA support and security headersmaster
parent
25f2cc5e59
commit
5500b54e79
@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: argentinamusic-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: argentinamusic-static
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: argentinamusic-static
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: static-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
volumes:
|
||||
- name: static-content
|
||||
hostPath:
|
||||
path: /root/static/argentinamusic.space
|
||||
type: Directory
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: static-nginx-config
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: argentinamusic-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
selector:
|
||||
app: argentinamusic-static
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: dashboard-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: dashboard-static
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: dashboard-static
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: static-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
volumes:
|
||||
- name: static-content
|
||||
hostPath:
|
||||
path: /root/static/dashboard.arcbjorn.com
|
||||
type: Directory
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: static-nginx-config
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: dashboard-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
selector:
|
||||
app: dashboard-static
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: homepage-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: homepage-static
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: homepage-static
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: static-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
volumes:
|
||||
- name: static-content
|
||||
hostPath:
|
||||
path: /root/static/homepage.arcbjorn.com
|
||||
type: Directory
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: static-nginx-config
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homepage-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
selector:
|
||||
app: homepage-static
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: humansconnect-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: humansconnect-static
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: humansconnect-static
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: static-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
volumes:
|
||||
- name: static-content
|
||||
hostPath:
|
||||
path: /root/static/humansconnect.ai
|
||||
type: Directory
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: static-nginx-config
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: humansconnect-static
|
||||
namespace: base-infrastructure
|
||||
spec:
|
||||
selector:
|
||||
app: humansconnect-static
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
@ -0,0 +1,38 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: static-nginx-config
|
||||
namespace: base-infrastructure
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
# SPA support - try files then fallback to index.html
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(css|js|ico|png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Hide sensitive files
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ \.git {
|
||||
deny all;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue