ProjectLighthouse/scripts-and-tools/docker-entrypoint.sh
Josh 263bfb5b23
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>
2023-01-04 19:26:49 -06:00

15 lines
362 B
Bash

#!/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