chore: chown /fgc/data on start so fgc can write bind-mount
All checks were successful
build-and-push / lint (push) Successful in 5s
build-and-push / sonar (push) Successful in 12s
build-and-push / docker (push) Successful in 1m13s

This commit is contained in:
nocci 2025-12-30 17:36:31 +00:00
parent 8ebb57a706
commit 67afeead60

View file

@ -6,6 +6,11 @@ echo "Version: https://github.com/vogler/free-games-claimer/tree/${COMMIT}"
[ ! -z $BRANCH ] && [ $BRANCH != "main" ] && echo "Branch: ${BRANCH}"
echo "Build: $NOW"
# Ensure writable data dir for fgc when host bind-mount is owned by root.
if [ "$(id -u)" -eq 0 ]; then
chown -R 1000:1000 /fgc/data 2>/dev/null || true
fi
# Remove chromium profile lock.
# When running in docker and then killing it, on the next run chromium displayed a dialog to unlock the profile which made the script time out.
# Maybe due to changed hostname of container or due to how the docker container kills playwright - didn't check.