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:
Josh 2023-01-04 19:26:49 -06:00 committed by GitHub
parent 993d14d90a
commit 263bfb5b23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 145 additions and 71 deletions

View 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