mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-09 05:18:47 +00:00
Make PhotoSubjects use a one to many relationship (#687)
* 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
This commit is contained in:
parent
35ea2682b9
commit
017dcd6888
22 changed files with 240 additions and 210 deletions
|
@ -1,15 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
chown -R lighthouse:lighthouse /lighthouse/data
|
||||
log() {
|
||||
local type="$1"; shift
|
||||
printf '%s [%s] [Entrypoint]: %s\n' "$(date -Iseconds)" "$type" "$*"
|
||||
}
|
||||
|
||||
if [ -d "/lighthouse/temp" ]; then
|
||||
cp -rf /lighthouse/temp/* /lighthouse/data
|
||||
rm -rf /lighthouse/temp
|
||||
log Note "Entrypoint script for Lighthouse $SERVER started".
|
||||
|
||||
if [ ! -d "/lighthouse/data" ]; then
|
||||
log Note "Creating data directory"
|
||||
mkdir -p "/lighthouse/data"
|
||||
fi
|
||||
|
||||
# run from cmd
|
||||
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
|
||||
exit $? # Expose error code from dotnet command
|
Loading…
Add table
Add a link
Reference in a new issue