Skip to content

Commit e387b1c

Browse files
committed
execute explo on container start
1 parent c4f8c66 commit e387b1c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docker-compose.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ services:
1919
#- WEEKLY_JAMS_FLAGS=--playlist=weekly-jams --download-mode=skip # Get tracks from weekly-jams, and only add tracks that are found locally to playlist
2020

2121
#- DAILY_JAMS_SCHEDULE=15 01 * * * # Runs daily, every day 15 minutes past 1PM
22-
#- DAILY_JAMS_FLAGS=--playlist=daily-jams --download-mode=skip # Get tracks from daily-jams, and only add tracks that are found locally to playlist
22+
#- DAILY_JAMS_FLAGS=--playlist=daily-jams --download-mode=skip # Get tracks from daily-jams, and only add tracks that are found locally to playlist
23+
24+
# Uncomment for testing (runs explo right after launcing the container)
25+
#- EXECUTE_ON_START=false # Whether to run explo when starting the container (useful for testing)
26+
#- START_FLAGS=--persist=false # if needed, set startup flags for testing

docker/start.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,10 @@ done
3434
chmod 600 /etc/crontabs/root
3535

3636
echo "[setup] Starting cron..."
37+
38+
if [ "$EXCECUTE_ON_START" = "true" ]; then
39+
echo "[setup] Executing startup task..."
40+
apk add --upgrade yt-dlp && cd /opt/explo && ./explo $START_FLAGS
41+
42+
fi
3743
crond -f -l 2

0 commit comments

Comments
 (0)