mount extra volumes for stash
This commit is contained in:
@@ -26,6 +26,7 @@ volumes:
|
|||||||
- name: vmshares
|
- name: vmshares
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
- name: plex
|
- name: plex
|
||||||
|
- name: plex-data
|
||||||
- name: nextcloud
|
- name: nextcloud
|
||||||
- name: nextcloud2
|
- name: nextcloud2
|
||||||
# - name: prometheus
|
# - name: prometheus
|
||||||
@@ -48,6 +49,7 @@ mounts:
|
|||||||
nextcloud: /data/glusterfs/nextcloud/brick1
|
nextcloud: /data/glusterfs/nextcloud/brick1
|
||||||
nextcloud2: /data/glusterfs/nextcloud2/brick1 # dead
|
nextcloud2: /data/glusterfs/nextcloud2/brick1 # dead
|
||||||
plex: /data/glusterfs/plex/brick1
|
plex: /data/glusterfs/plex/brick1
|
||||||
|
plex-data: /data/glusterfs/plex-data/brick1
|
||||||
postgres: /data/glusterfs/postgres/brick1 # dead
|
postgres: /data/glusterfs/postgres/brick1 # dead
|
||||||
prometheus: /data/glusterfs/prometheus/brick1
|
prometheus: /data/glusterfs/prometheus/brick1
|
||||||
tmp: /data/glusterfs/tmp/brick1
|
tmp: /data/glusterfs/tmp/brick1
|
||||||
@@ -78,6 +80,9 @@ mounts:
|
|||||||
- name: plex
|
- name: plex
|
||||||
status: mounted
|
status: mounted
|
||||||
src: "UUID=57a3133c-6ca3-4974-9a0b-7efc8c0c533b"
|
src: "UUID=57a3133c-6ca3-4974-9a0b-7efc8c0c533b"
|
||||||
|
- name: plex-data
|
||||||
|
status: mounted
|
||||||
|
src: "UUID=cdff8026-1d56-4cee-8c12-8c61dc587850"
|
||||||
- name: nextcloud2 # dead
|
- name: nextcloud2 # dead
|
||||||
status: mounted
|
status: mounted
|
||||||
src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4"
|
src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4"
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ fstab:
|
|||||||
- name: plex
|
- name: plex
|
||||||
path: "/opt/data/plex"
|
path: "/opt/data/plex"
|
||||||
state: mounted
|
state: mounted
|
||||||
|
- name: plex-data
|
||||||
|
path: "/opt/data/plex-data"
|
||||||
|
state: mounted
|
||||||
# - name: jenkins
|
# - name: jenkins
|
||||||
# path: "/var/lib/jenkins"
|
# path: "/var/lib/jenkins"
|
||||||
# state: mounted
|
# state: mounted
|
||||||
|
|||||||
13
ansible-5/roles/prod.k3s/files/stash/pv-media-claim.yaml
Normal file
13
ansible-5/roles/prod.k3s/files/stash/pv-media-claim.yaml
Normal 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
|
||||||
17
ansible-5/roles/prod.k3s/files/stash/pv-media.yaml
Normal file
17
ansible-5/roles/prod.k3s/files/stash/pv-media.yaml
Normal 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"
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
#values file for stash deployment
|
#values file for stash deployment
|
||||||
|
#https://github.com/k8s-at-home/charts/blob/master/charts/stable/stash/values.yaml
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: stashapp/stash
|
repository: stashapp/stash
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
loop:
|
loop:
|
||||||
- stash/pv.yaml
|
- stash/pv.yaml
|
||||||
- stash/pv-claim.yaml
|
- stash/pv-claim.yaml
|
||||||
|
# - stash/pv-media.yaml
|
||||||
|
# - stash/pv-media-claim.yaml
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Add stash chart helm repo
|
- name: Add stash chart helm repo
|
||||||
|
|||||||
38
dockerfiles/services/stashapp/Dockerfile
Normal file
38
dockerfiles/services/stashapp/Dockerfile
Normal 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.";
|
||||||
0
dockerfiles/services/stashapp/cli/.bash_cli
Normal file
0
dockerfiles/services/stashapp/cli/.bash_cli
Normal file
4
dockerfiles/services/stashapp/cli/build
Executable file
4
dockerfiles/services/stashapp/cli/build
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo -e "\033 building new docker image"
|
||||||
|
|
||||||
|
docker build . -t xaicorp/stashapp:latest
|
||||||
3
dockerfiles/services/stashapp/cli/build.help
Normal file
3
dockerfiles/services/stashapp/cli/build.help
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ARGS - The arguments you wish to provide to this command
|
||||||
|
|
||||||
|
TODO: Fill out the help information for this command.
|
||||||
1
dockerfiles/services/stashapp/cli/build.usage
Normal file
1
dockerfiles/services/stashapp/cli/build.usage
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ARGS...
|
||||||
3
dockerfiles/services/stashapp/cli/run
Executable file
3
dockerfiles/services/stashapp/cli/run
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
docker run --rm -p9999:9999 -v $(PWD)/test.tc:/test.tc xaicorp/stashapp
|
||||||
3
dockerfiles/services/stashapp/cli/run.help
Normal file
3
dockerfiles/services/stashapp/cli/run.help
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ARGS - The arguments you wish to provide to this command
|
||||||
|
|
||||||
|
TODO: Fill out the help information for this command.
|
||||||
1
dockerfiles/services/stashapp/cli/run.usage
Normal file
1
dockerfiles/services/stashapp/cli/run.usage
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ARGS...
|
||||||
8
dockerfiles/services/stashapp/cli/shell
Executable file
8
dockerfiles/services/stashapp/cli/shell
Executable 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
|
||||||
3
dockerfiles/services/stashapp/cli/shell.help
Normal file
3
dockerfiles/services/stashapp/cli/shell.help
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ARGS - The arguments you wish to provide to this command
|
||||||
|
|
||||||
|
TODO: Fill out the help information for this command.
|
||||||
1
dockerfiles/services/stashapp/cli/shell.usage
Normal file
1
dockerfiles/services/stashapp/cli/shell.usage
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ARGS...
|
||||||
8
dockerfiles/services/stashapp/docker-compose.yml
Normal file
8
dockerfiles/services/stashapp/docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
15
dockerfiles/services/stashapp/entrypoint.sh
Normal file
15
dockerfiles/services/stashapp/entrypoint.sh
Normal 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!"
|
||||||
BIN
dockerfiles/services/stashapp/test.tc
Normal file
BIN
dockerfiles/services/stashapp/test.tc
Normal file
Binary file not shown.
Reference in New Issue
Block a user