mirror of
https://github.com/GothenburgBitFactory/taskchampion-sync-server.git
synced 2025-06-26 10:54:29 +02:00

* feat(docker): simplify docker compose for end users The previous docker-compose requires end user to manually handle permissions of taskchampion data dir. And this commit has directories automatically set up in docker-entrypoint.sh, just like what postgresql did in https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh * fix(docker): revert to anonymous data volume for compatibility * feat: use uid 1092 for taskchampion * fix(docker): revert mkdir This is embarrassing that subpaths are not automatically created. So we still need mkdir service in case of anonymous data volume. * fix(docker): typo
13 lines
449 B
Bash
Executable file
13 lines
449 B
Bash
Executable file
#!/bin/sh
|
|
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"
|
|
if [ "$(id -u)" = "0" ]; then
|
|
echo "switching to user 'taskchampion'"
|
|
exec su-exec taskchampion "$@"
|
|
fi
|
|
fi
|