Skip to content

Commit

Permalink
implement defaults in entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfagun74 committed Apr 2, 2024
1 parent 4f55ac5 commit 251c505
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ check_folders() {
return
fi

# Set default values if environment variables are not set or are empty
[ -z "$FILES_VOLUME" ] && FILES_VOLUME="/files"
[ -z "$IMAGES_VOLUME" ] && IMAGES_VOLUME="/images"
[ -z "$LOGS_VOLUME" ] && LOGS_VOLUME="/logs"
[ -z "$SQLITEDB_VOLUME" ] && SQLITEDB_VOLUME="/db"

createDirectoryIfNotExist "$FILES_VOLUME"
createDirectoryIfNotExist "$IMAGES_VOLUME"
createDirectoryIfNotExist "$LOGS_VOLUME"
Expand Down

0 comments on commit 251c505

Please sign in to comment.