Skip to content

Commit

Permalink
Issue #408: init to browser
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Oct 24, 2024
1 parent 7f0f485 commit 8ac62fd
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions kubernetes/aks/apps/fertiscan/base/filebrowser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ spec:
labels:
app: filebrowser
spec:
initContainers:
- name: init-db
image: alpine
command:
- "/bin/sh"
- "-c"
- |
if [ ! -f /db/database.db ]; then
touch /db/database.db && echo "Database file created";
fi
volumeMounts:
- name: filebrowser-db
mountPath: /db
containers:
- name: file-browser
image: filebrowser/filebrowser
Expand All @@ -33,9 +46,6 @@ spec:
- "/bin/sh"
- "-c"
- |
if [ ! -f /db/database.db ]; then
/filebrowser config init --database=/db/database.db;
fi
/filebrowser config set --auth.method=proxy --auth.header=X-Vouch-Token && \
/filebrowser -r /srv -d /db/database.db
volumes:
Expand All @@ -48,7 +58,6 @@ spec:
- name: filebrowser-db
persistentVolumeClaim:
claimName: filebrowser-db-pvc

---
apiVersion: v1
kind: PersistentVolumeClaim
Expand Down

0 comments on commit 8ac62fd

Please sign in to comment.