mount extra volumes for stash

This commit is contained in:
2022-11-29 21:13:47 -05:00
parent d325d56237
commit 20765de381
20 changed files with 129 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ volumes:
- name: vmshares
- name: mariadb
- name: plex
- name: plex-data
- name: nextcloud
- name: nextcloud2
# - name: prometheus
@@ -48,6 +49,7 @@ mounts:
nextcloud: /data/glusterfs/nextcloud/brick1
nextcloud2: /data/glusterfs/nextcloud2/brick1 # dead
plex: /data/glusterfs/plex/brick1
plex-data: /data/glusterfs/plex-data/brick1
postgres: /data/glusterfs/postgres/brick1 # dead
prometheus: /data/glusterfs/prometheus/brick1
tmp: /data/glusterfs/tmp/brick1
@@ -78,6 +80,9 @@ mounts:
- name: plex
status: mounted
src: "UUID=57a3133c-6ca3-4974-9a0b-7efc8c0c533b"
- name: plex-data
status: mounted
src: "UUID=cdff8026-1d56-4cee-8c12-8c61dc587850"
- name: nextcloud2 # dead
status: mounted
src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4"

View File

@@ -8,6 +8,9 @@ fstab:
- name: plex
path: "/opt/data/plex"
state: mounted
- name: plex-data
path: "/opt/data/plex-data"
state: mounted
# - name: jenkins
# path: "/var/lib/jenkins"
# state: mounted

View File

@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: stash-pv-media-claim
namespace: stashapp
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi

View File

@@ -0,0 +1,17 @@
---
# persistent volume
apiVersion: v1
kind: PersistentVolume
metadata:
name: plex-pv-media-local
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 100Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/dev/mapper/plex-data"

View File

@@ -1,5 +1,6 @@
---
#values file for stash deployment
#https://github.com/k8s-at-home/charts/blob/master/charts/stable/stash/values.yaml
image:
repository: stashapp/stash

View File

@@ -20,6 +20,8 @@
loop:
- stash/pv.yaml
- stash/pv-claim.yaml
# - stash/pv-media.yaml
# - stash/pv-media-claim.yaml
become: true
- name: Add stash chart helm repo

View File

@@ -0,0 +1,38 @@
FROM stashapp/stash:latest as binary
FROM ubuntu:22.04
COPY --from=binary /usr/bin/stash /usr/bin/stash
#RUN apk add --no-cache ca-certificates python3 py3-requests py3-requests-toolbelt py3-lxml py3-pip ffmpeg vips-tools ruby \
# && pip install --no-cache-dir mechanicalsoup cloudscraper \
# && gem install faraday
RUN apt-get update && apt-get install -y \
ca-certificates \
python3 \
python3-requests \
python3-requests-toolbelt \
python3-lxml \
python3-pip \
ffmpeg \
libvips-tools \
ruby \
tcplay \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir mechanicalsoup cloudscraper \
&& gem install faraday
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN mkdir -p /root/.stash
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
COPY ./entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
EXPOSE 9999
CMD ["/entrypoint"]
# Tests
RUN python --version | grep "Python 3."; \
ruby --version | grep "ruby 3.";

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
echo -e "\033 building new docker image"
docker build . -t xaicorp/stashapp:latest

View File

@@ -0,0 +1,3 @@
ARGS - The arguments you wish to provide to this command
TODO: Fill out the help information for this command.

View File

@@ -0,0 +1 @@
ARGS...

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
docker run --rm -p9999:9999 -v $(PWD)/test.tc:/test.tc xaicorp/stashapp

View File

@@ -0,0 +1,3 @@
ARGS - The arguments you wish to provide to this command
TODO: Fill out the help information for this command.

View File

@@ -0,0 +1 @@
ARGS...

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -ex
docker run --rm -it \
-v $(pwd)/test.tc:/test.tc \
-v $(pwd)/entrypoint.sh:/entrypoint \
--privileged=true \
xaicorp/stashapp:latest /bin/bash

View File

@@ -0,0 +1,3 @@
ARGS - The arguments you wish to provide to this command
TODO: Fill out the help information for this command.

View File

@@ -0,0 +1 @@
ARGS...

View File

@@ -0,0 +1,8 @@
---
services:
app:
build:
context: .
dockerfile: Dockerfile

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env sh
set -ex
echo "mount loop device"
mkdir /data
tcplay --map=data2 --device=`losetup -f --show /test.tc`
# losetup /dev/loop0 foo.tc
#tcplay -m test.tc -d /dev/loop0
mount -o nodev,nosuid,uid=1000,gid=100 /dev/mapper/data2 /data
echo "Starting stash app!"
exec /usr/bin/stash
echo "Goodbye!"

Binary file not shown.