From 9ef4e37167e528c5ee585ee08376038528176fa0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 9 Jul 2022 21:07:25 +0200 Subject: [PATCH] Create run.sh --- wger/rootfs/run.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 wger/rootfs/run.sh diff --git a/wger/rootfs/run.sh b/wger/rootfs/run.sh new file mode 100644 index 000000000..704e4a10d --- /dev/null +++ b/wger/rootfs/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +LOCATION=/data +python3 manage.py migrate || true +mkdir -p "$LOCATION" +touch "$LOCATION"/database.sqlite || true +chown -R wger "$LOCATION" || true +chmod -R 777 "$LOCATION" || true +rm /home/wger/db/database.sqlite &>/dev/null || true +ln -s "$LOCATION"/database.sqlite /home/wger/db + +echo "Launch app" +su -H -u wger bash -c /./home/wger/entrypoint.sh