audiobook
This commit is contained in:
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
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: audiobookshelf-ingress
|
||||
namespace: projects
|
||||
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
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: audiobookshelf
|
||||
namespace: projects
|
||||
spec:
|
||||
ports:
|
||||
- port: 13378
|
||||
targetPort: 13378
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: discovery.k8s.io/v1
|
||||
kind: EndpointSlice
|
||||
metadata:
|
||||
name: audiobookshelf
|
||||
namespace: projects
|
||||
labels:
|
||||
kubernetes.io/service-name: audiobookshelf
|
||||
addressType: IPv4
|
||||
ports:
|
||||
- name: http
|
||||
port: 13378
|
||||
protocol: TCP
|
||||
endpoints:
|
||||
- addresses:
|
||||
- 100.122.128.107
|
||||
conditions:
|
||||
ready: true
|
||||
# apiVersion: networking.k8s.io/v1
|
||||
# kind: Ingress
|
||||
# metadata:
|
||||
# name: audiobookshelf-ingress
|
||||
# namespace: projects
|
||||
# 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
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# name: audiobookshelf
|
||||
# namespace: projects
|
||||
# spec:
|
||||
# ports:
|
||||
# - port: 13378
|
||||
# targetPort: 13378
|
||||
# protocol: TCP
|
||||
# ---
|
||||
# apiVersion: discovery.k8s.io/v1
|
||||
# kind: EndpointSlice
|
||||
# metadata:
|
||||
# name: audiobookshelf
|
||||
# namespace: projects
|
||||
# labels:
|
||||
# kubernetes.io/service-name: audiobookshelf
|
||||
# addressType: IPv4
|
||||
# ports:
|
||||
# - name: http
|
||||
# port: 13378
|
||||
# protocol: TCP
|
||||
# endpoints:
|
||||
# - addresses:
|
||||
# - 100.122.128.107
|
||||
# conditions:
|
||||
# ready: true
|
||||
|
||||
Reference in New Issue
Block a user