mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-28 11:42:28 +00:00
* Attempt to remodel PhotoSubject and Photo relationship
* Fix migration name
* Use exactName for migration lock
* Revert "Use exactName for migration lock"
This reverts commit 76cee6a3ff
.
* Set command timeout to 5 minutes for database migrations
* Delete unused PhotoSubjects in migration
* Clean up website queries and finalize subject refactor
* Add migration to remove PhotoSubjectCollection
* Add grace period for container startup and optimize startup
* Make config backup copy original file
* Allow docker entrypoint to fix data permissions
33 lines
No EOL
898 B
Bash
33 lines
No EOL
898 B
Bash
#!/bin/sh
|
|
|
|
log() {
|
|
local type="$1"; shift
|
|
printf '%s [%s] [Entrypoint]: %s\n' "$(date -Iseconds)" "$type" "$*"
|
|
}
|
|
|
|
log Note "Entrypoint script for Lighthouse $SERVER started".
|
|
|
|
if [ ! -d "/lighthouse/data" ]; then
|
|
log Note "Creating data directory"
|
|
mkdir -p "/lighthouse/data"
|
|
fi
|
|
|
|
owner=$(stat -c "%U %G" /lighthouse/data)
|
|
if [ owner != "lighthouse lighthouse" ]; then
|
|
log Note "Changing ownership of data directory"
|
|
chown -R lighthouse:lighthouse /lighthouse/data
|
|
fi
|
|
|
|
if [ -d "/lighthouse/temp" ]; then
|
|
log Note "Copying temp directory to data"
|
|
cp -rn /lighthouse/temp/* /lighthouse/data
|
|
rm -rf /lighthouse/temp
|
|
fi
|
|
|
|
# Start server
|
|
|
|
log Note "Startup tasks finished, starting $SERVER..."
|
|
cd /lighthouse/data
|
|
exec su-exec lighthouse:lighthouse dotnet /lighthouse/app/LBPUnion.ProjectLighthouse.Servers."$SERVER".dll
|
|
|
|
exit $? # Expose error code from dotnet command |