DockerRegistryWebUI/run
2022-05-10 08:14:47 +01:00

31 lines
502 B
Bash

#!/usr/bin/env bash
#
set -o nounset \
-o errexit \
-o verbose \
-o xtrace
# Set environment values if they exist as arguments
if [ $# -ne 0 ]; then
echo "===> Overriding env params with args ..."
for var in "$@"
do
export "$var"
done
fi
# copy example production.env
if [ ! -f "env/production.env" ]; then
cp examples/env/production.env env/production.env
fi
echo "===> ENV Variables ..."
env | sort
echo "===> User"
id
echo "===> Running ... "
exec npm run start-prod