correct entry script bug and allow config from env file

- A bug in `entry` caused the script to not change into the directory correctly.
This was corrected by marking the script as bash rather than sh.
- `install.sh` now stops a running service before updating
- `docker-compose.yml` now assigns a consistent container name for the app
- `docker-compose.yml` now uses environment variables or a `.env` file to
  assign container name and port mappings if available
- updated readme file with better instructions
This commit is contained in:
2024-02-29 16:37:12 -08:00
parent ca3d2f5540
commit 1a4756fda0
5 changed files with 63 additions and 14 deletions
+11 -3
View File
@@ -21,6 +21,15 @@ if [ "$EUID" -ne 0 ]
exit 1
fi
# stop any running systemd service if not running in a docker environment
if [ -f /.dockerenv ]; then
echo "Docker environment detected - skipping systemd installation"
else
echo "stopping system service"
systemctl stop streamline-emr
fi
set -e
# copy root files
@@ -33,9 +42,8 @@ for f in $(find $LOCATION/images -name "*.img");do
docker load -i $f
done
if [ -f /.dockerenv ]; then
echo "Docker environment detected - skipping systemd installation"
else
# install systemd service unless running in a docker environment
if [ ! -f /.dockerenv ]; then
echo "installing system service"
systemctl daemon-reload
systemctl enable streamline-emr