Create entrypoint.sh
Browse files- entrypoint.sh +15 -0
entrypoint.sh
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
echo "[entrypoint] Restoring DB (if backup exists)..."
|
| 5 |
+
/home/user/entrypoint/restore.sh || echo "No restore available"
|
| 6 |
+
|
| 7 |
+
echo "[entrypoint] Starting Gotify..."
|
| 8 |
+
/app/gotify &
|
| 9 |
+
GOTIFY_PID=$!
|
| 10 |
+
|
| 11 |
+
# Background backup loop
|
| 12 |
+
while true; do
|
| 13 |
+
/home/user/entrypoint/backup.sh || echo "Backup failed"
|
| 14 |
+
sleep ${BACKUP_INTERVAL:-300}
|
| 15 |
+
done
|