mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-26 17:01:28 +00:00
Containerize Project Lighthouse (#582)
* Add lighthouse docker support * Update to NET 7.0 * Make docker copy git repository info * Add restart policy to compose file * Delete temp folder after copying to data * Only build the docker image once * Fix builds from being dirty * Add su-exec to final image * Run lighthouse as non root user * Add compose file to gitignore * Remove compose file from gitignore Co-authored-by: Dagg <daggintosh@outlook.com>
This commit is contained in:
parent
993d14d90a
commit
263bfb5b23
7 changed files with 145 additions and 71 deletions
15
scripts-and-tools/docker-entrypoint.sh
Normal file
15
scripts-and-tools/docker-entrypoint.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
chown -R lighthouse:lighthouse /lighthouse/data
|
||||
|
||||
if [ -d "/lighthouse/temp" ]; then
|
||||
cp -rf /lighthouse/temp/* /lighthouse/data
|
||||
rm -rf /lighthouse/temp
|
||||
fi
|
||||
|
||||
# run from cmd
|
||||
|
||||
cd /lighthouse/data
|
||||
exec su-exec lighthouse:lighthouse dotnet /lighthouse/app/LBPUnion.ProjectLighthouse.Servers."$SERVER".dll
|
||||
|
||||
exit $? # Expose error code from dotnet command
|
Loading…
Add table
Add a link
Reference in a new issue