First commit of the node docker image after move out of core

This commit is contained in:
Torsten Raudssus 2023-03-19 05:40:11 +01:00
commit 9ffd5c63d3
4 changed files with 124 additions and 0 deletions

23
docker-entrypoint.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
IP=$( hostname -i )
if [[ -z "$@" ]]
then
if [[ -f "package.json" ]]
then
PACKAGE_JSON_START=$( cat package.json | jq -r '.scripts.start // empty' )
if [[ -z "$PACKAGE_JSON_START" ]]
then
echo "package.json found, but no start script, starting bash..."
exec bash
else
exec $PACKAGE_JSON_START
fi
else
echo "No package.json found, starting bash..."
exec bash
fi
else
exec $@
fi