From ecdfb6bdfdef4d7ee8094f61b3e84d16ad5a8f06 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 3 Mar 2025 16:53:53 -0500 Subject: [PATCH] Use DATA_DIR and taskchampion username in entrypoint (#99) In fact, there is no taskchampion group (1092 is not a defined gid). Instead taskchampion is in the `users` group. --- docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 09e2ab1..970fa4f 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -3,9 +3,9 @@ set -e echo "starting entrypoint script..." if [ "$1" = "/bin/taskchampion-sync-server" ]; then echo "setting data directories" - mkdir -p "/var/lib/taskchampion-sync-server/data" - chown -R 1092:1092 "/var/lib/taskchampion-sync-server/data" - chmod -R 700 "/var/lib/taskchampion-sync-server/data" + mkdir -p "${DATA_DIR}" + chown -R taskchampion:users "${DATA_DIR}" + chmod -R 700 "${DATA_DIR}" if [ "$(id -u)" = "0" ]; then echo "switching to user 'taskchampion'" exec su-exec taskchampion "$@"