1
0
Fork 0
mirror of https://github.com/thomiceli/opengist.git synced 2025-01-24 07:00:32 +00:00
opengist/docker/entrypoint.sh

19 lines
391 B
Bash
Raw Normal View History

2023-06-18 12:50:36 +02:00
#!/bin/sh
export USER=opengist
2023-06-21 17:52:18 +02:00
UID=${UID:-1000}
2023-06-18 12:50:36 +02:00
GID=${GID:-1000}
groupmod -o -g "$GID" $USER
2023-06-21 17:52:18 +02:00
usermod -o -u "$UID" $USER
2023-06-18 12:50:36 +02:00
chown -R "$USER:$USER" /opengist
2023-10-15 15:14:34 +09:00
chown -R "$USER:$USER" /config.yml
2023-06-18 12:50:36 +02:00
2024-09-28 01:31:18 +02:00
if [ -f "/run/secrets/opengist_secrets" ]; then
set -a
. /run/secrets/opengist_secrets
set +a
fi
2023-10-15 15:14:34 +09:00
exec su $USER -c "OG_OPENGIST_HOME=/opengist /app/opengist/opengist --config /config.yml"