audiobook
This commit is contained in:
@@ -94,23 +94,23 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
# server {
|
||||||
listen 443 ssl;
|
# listen 443 ssl;
|
||||||
listen [::]:443 ssl;
|
# listen [::]:443 ssl;
|
||||||
server_name audiobook.alexmickelson.guru;
|
# server_name audiobook.alexmickelson.guru;
|
||||||
|
|
||||||
location / {
|
# location / {
|
||||||
proxy_pass http://audiobookshelf:80;
|
# proxy_pass http://audiobookshelf:80;
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
# proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
# proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
# proxy_http_version 1.1;
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
# server {
|
# server {
|
||||||
# listen 443 ssl;
|
# listen 443 ssl;
|
||||||
|
|||||||
95
kubernetes/audiobookshelf/audiobook.yml
Normal file
95
kubernetes/audiobookshelf/audiobook.yml
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf
|
||||||
|
namespace: audiobookshelf
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: audiobookshelf
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: audiobookshelf
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: audiobookshelf
|
||||||
|
image: ghcr.io/advplyr/audiobookshelf:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
hostPort: 13378
|
||||||
|
volumeMounts:
|
||||||
|
- name: audiobooks
|
||||||
|
mountPath: /audiobooks
|
||||||
|
- name: audiobooks-libation
|
||||||
|
mountPath: /audiobooks-libation
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
- name: metadata
|
||||||
|
mountPath: /metadata
|
||||||
|
volumes:
|
||||||
|
- name: audiobooks
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/audiobooks
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: audiobooks-libation
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/audiobooks-libation
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: config
|
||||||
|
hostPath:
|
||||||
|
path: /data/audiobookshelf/config
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: metadata
|
||||||
|
hostPath:
|
||||||
|
path: /data/audiobookshelf/metadata
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf
|
||||||
|
namespace: audiobookshelf
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: audiobookshelf
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 13378
|
||||||
|
targetPort: 80
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf-ingress
|
||||||
|
namespace: audiobookshelf
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: cloudflare-issuer
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- audiobook.alexmickelson.guru
|
||||||
|
secretName: audiobookshelf-tls-cert
|
||||||
|
rules:
|
||||||
|
- host: audiobook.alexmickelson.guru
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: audiobookshelf
|
||||||
|
port:
|
||||||
|
number: 13378
|
||||||
|
---
|
||||||
1
kubernetes/nfs-server/.gitignore
vendored
1
kubernetes/nfs-server/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
test/
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
FROM alpine:latest
|
|
||||||
|
|
||||||
RUN apk add --no-cache nfs-utils bash
|
|
||||||
|
|
||||||
RUN mkdir -p /exports
|
|
||||||
|
|
||||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
||||||
|
|
||||||
EXPOSE 2049 20048
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
ALLOWED_CLIENTS="${ALLOWED_CLIENTS:-*}"
|
|
||||||
|
|
||||||
echo "/exports $ALLOWED_CLIENTS(rw,sync,no_subtree_check,no_root_squash)" > /etc/exports
|
|
||||||
|
|
||||||
rpcbind || true
|
|
||||||
rpc.statd || true
|
|
||||||
|
|
||||||
echo "Starting NFS server..."
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mount -t nfsd nfsd /proc/fs/nfsd
|
|
||||||
|
|
||||||
rpc.nfsd -N 3 -V 4 --grace-time 10 $nfsd_debug_opt &
|
|
||||||
rpc.mountd -N 2 -N 3 -V 4 --foreground $mountd_debug_opt &
|
|
||||||
|
|
||||||
wait
|
|
||||||
|
|
||||||
# rpc.mountd -N 2 -N 3 -V 4 --foreground
|
|
||||||
|
|
||||||
# wait
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<https://wiki.alpinelinux.org/wiki/Setting_up_an_NFS_server>
|
|
||||||
|
|
||||||
|
|
||||||
example docker run
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --rm -it \
|
|
||||||
--name nfs-server \
|
|
||||||
--cap-add SYS_ADMIN \
|
|
||||||
-e ALLOWED_CLIENTS="127.0.0.1.0/24" \
|
|
||||||
-v (pwd)/test:/exports \
|
|
||||||
--network host \
|
|
||||||
nfs-server
|
|
||||||
```
|
|
||||||
|
|
||||||
currently not working, i like the idea of running the nfs server in a docker container, but doing it as a nixos module is probably better
|
|
||||||
@@ -1,53 +1,53 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
# apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
# kind: Ingress
|
||||||
metadata:
|
# metadata:
|
||||||
name: audiobookshelf-ingress
|
# name: audiobookshelf-ingress
|
||||||
namespace: projects
|
# namespace: projects
|
||||||
annotations:
|
# annotations:
|
||||||
cert-manager.io/cluster-issuer: cloudflare-issuer
|
# cert-manager.io/cluster-issuer: cloudflare-issuer
|
||||||
spec:
|
# spec:
|
||||||
ingressClassName: nginx
|
# ingressClassName: nginx
|
||||||
tls:
|
# tls:
|
||||||
- hosts:
|
# - hosts:
|
||||||
- audiobook.alexmickelson.guru
|
# - audiobook.alexmickelson.guru
|
||||||
secretName: audiobookshelf-tls-cert
|
# secretName: audiobookshelf-tls-cert
|
||||||
rules:
|
# rules:
|
||||||
- host: audiobook.alexmickelson.guru
|
# - host: audiobook.alexmickelson.guru
|
||||||
http:
|
# http:
|
||||||
paths:
|
# paths:
|
||||||
- path: /
|
# - path: /
|
||||||
pathType: Prefix
|
# pathType: Prefix
|
||||||
backend:
|
# backend:
|
||||||
service:
|
# service:
|
||||||
name: audiobookshelf
|
# name: audiobookshelf
|
||||||
port:
|
# port:
|
||||||
number: 13378
|
# number: 13378
|
||||||
---
|
# ---
|
||||||
apiVersion: v1
|
# apiVersion: v1
|
||||||
kind: Service
|
# kind: Service
|
||||||
metadata:
|
# metadata:
|
||||||
name: audiobookshelf
|
# name: audiobookshelf
|
||||||
namespace: projects
|
# namespace: projects
|
||||||
spec:
|
# spec:
|
||||||
ports:
|
# ports:
|
||||||
- port: 13378
|
# - port: 13378
|
||||||
targetPort: 13378
|
# targetPort: 13378
|
||||||
protocol: TCP
|
# protocol: TCP
|
||||||
---
|
# ---
|
||||||
apiVersion: discovery.k8s.io/v1
|
# apiVersion: discovery.k8s.io/v1
|
||||||
kind: EndpointSlice
|
# kind: EndpointSlice
|
||||||
metadata:
|
# metadata:
|
||||||
name: audiobookshelf
|
# name: audiobookshelf
|
||||||
namespace: projects
|
# namespace: projects
|
||||||
labels:
|
# labels:
|
||||||
kubernetes.io/service-name: audiobookshelf
|
# kubernetes.io/service-name: audiobookshelf
|
||||||
addressType: IPv4
|
# addressType: IPv4
|
||||||
ports:
|
# ports:
|
||||||
- name: http
|
# - name: http
|
||||||
port: 13378
|
# port: 13378
|
||||||
protocol: TCP
|
# protocol: TCP
|
||||||
endpoints:
|
# endpoints:
|
||||||
- addresses:
|
# - addresses:
|
||||||
- 100.122.128.107
|
# - 100.122.128.107
|
||||||
conditions:
|
# conditions:
|
||||||
ready: true
|
# ready: true
|
||||||
|
|||||||
Reference in New Issue
Block a user