apps: use garage for files
Anirudh Oppiliappan x@icyphox.sh
Tue, 09 Jul 2024 23:20:53 +0300
5 files changed,
10 insertions(+),
109 deletions(-)
M
apps/coredns/coredns.yaml
→
apps/coredns/coredns.yaml
@@ -8,6 +8,7 @@
rewrite name dav.koti.lan radicale.default.svc.koti.lan rewrite name rss.koti.lan yarr.default.svc.koti.lan rewrite name g.koti.lan grafana.monitoring.svc.koti.lan + rewrite name files.garage.koti.lan garage.default.svc.koti.lan } kind: ConfigMap metadata:
M
apps/imaginary/imaginary.yaml
→
apps/imaginary/imaginary.yaml
@@ -19,10 +19,6 @@ containers:
- name: imaginary image: h2non/imaginary:latest imagePullPolicy: IfNotPresent - volumeMounts: - - name: film - mountPath: /film - readOnly: false ports: - name: http containerPort: 9000@@ -31,14 +27,11 @@ - name: DEBUG
value: "*" command: ["imaginary"] args: - - -mount - - /film - -a - 0.0.0.0 - volumes: - - name: film - hostPath: - path: /var/lib/uploads/film + - -enable-url-source + - -allowed-origins + - http://files.garage.koti.lan/ --- apiVersion: v1 kind: Service
M
apps/site/site.yaml
→
apps/site/site.yaml
@@ -15,9 +15,9 @@ - path: /
pathType: Prefix backend: service: - name: site + name: garage port: - number: 8080 + number: 80 --- apiVersion: networking.k8s.io/v1 kind: Ingress@@ -34,100 +34,7 @@ - path: /
pathType: Prefix backend: service: - name: site + name: garage port: - number: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: site - labels: - app: site -spec: - selector: - matchLabels: - app: site - template: - metadata: - labels: - app: site - spec: - nodeSelector: - kubernetes.io/hostname: sini - containers: - - name: site - image: nginx:latest - imagePullPolicy: IfNotPresent - volumeMounts: - - name: site - mountPath: /www - readOnly: false - - name: nginx-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - ports: - - containerPort: 80 - volumes: - - name: site - hostPath: - path: /var/www - - name: nginx-config - configMap: - name: site-nginx ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: site-nginx -data: - nginx.conf: | - user nginx; - worker_processes 1; - - error_log /var/log/nginx/error.log warn; - pid /var/run/nginx.pid; - - events { - worker_connections 1024; - } - - http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - sendfile on; - - keepalive_timeout 65; - - gzip on; - - server { - listen 80; - server_name _; - - location / { - root /www; - index index.html index.htm; - } - } - } ---- -apiVersion: v1 -kind: Service -metadata: - name: site -spec: - selector: - app: site - ports: - - name: site-http - port: 8080 - targetPort: 80 + number: 80
M
readme
→
readme
@@ -29,9 +29,8 @@ APPLICATIONS
• radicale: CardDAV/CalDAV server (dav.koti.lan) • yarr: RSS reader (rss.koti.lan) -• fsrv: file host service (x.icyphox.sh) -• site: my personal website (icyphox.sh, anirudh.fi) • legit: git web frontend (git.icyphox.sh) • imaginary: image manipuation service (x.icyphox.sh, cdn.icyphox.sh) • pixelfed: private image hosting • honk: ActivityPub server (h.icyphox.sh) +• garage: object storage service for website and files (icyphox.sh, x.icyphox.sh)