mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-30 15:37:44 +02:00
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: music-transcode
|
|
namespace: default
|
|
spec:
|
|
schedule: "0 2 * * *"
|
|
suspend: true
|
|
concurrencyPolicy: "Forbid"
|
|
successfulJobsHistoryLimit: 3
|
|
failedJobsHistoryLimit: 5
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 3
|
|
ttlSecondsAfterFinished: 300
|
|
template:
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
restartPolicy: OnFailure
|
|
initContainers:
|
|
containers:
|
|
- name: transcode-incremental
|
|
image: ghcr.io/auricom/freac:1.1.7@sha256:6f2f01265beb627567457d74a9df2f24c0a967baf1f0f9232626a6b903e82a0f
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: TRANSCODE_INPUT_DIR
|
|
value: /mnt/music/
|
|
- name: TRANSCODE_OUTPUT_DIR
|
|
value: /mnt/music_transcoded/
|
|
- name: TRANSCODE_FREAC_BIN
|
|
value: /app/freaccmd
|
|
command:
|
|
- "/bin/bash"
|
|
- "-c"
|
|
- |
|
|
#!/bin/bash
|
|
|
|
cp /app/transcode/transcode.sh /tmp/transcode.sh
|
|
cp /app/transcode/transcode_exclude.cfg /tmp/transcode_exclude.cfg
|
|
chmod +x /tmp/transcode.sh
|
|
|
|
cd /tmp
|
|
./transcode.sh -c
|
|
./transcode.sh -r
|
|
|
|
volumeMounts:
|
|
- name: music-transcoded
|
|
mountPath: /mnt/music_transcoded
|
|
- name: music
|
|
mountPath: /mnt/music
|
|
- name: scripts
|
|
mountPath: /app/scripts
|
|
readOnly: true
|
|
|
|
volumes:
|
|
- name: music-transcoded
|
|
nfs:
|
|
server: "${LOCAL_LAN_TRUENAS}"
|
|
path: /mnt/storage/music_transcoded
|
|
- name: music
|
|
nfs:
|
|
server: "${LOCAL_LAN_TRUENAS}"
|
|
path: /mnt/storage/music
|
|
- name: scripts
|
|
configMap:
|
|
name: transcode-configmap
|