diff --git a/Dockerfile b/Dockerfile index 6d1b998..83c8282 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ ENV USER=container \ HOME=/home/container \ NODE_ENV=production \ HTTP_HOST=0.0.0.0 \ - HTTP_PORT=80 + HTTP_PORT=80 \ + DOCKER=true WORKDIR /home/container COPY --from=builder --chown=container:container /build /app EXPOSE ${HTTP_PORT}/tcp diff --git a/scripts/start.sh b/scripts/start.sh index fb9728c..f1e1c72 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,7 +1,10 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE}" -base_dir=$(dirname $(dirname "$source")) +#!/usr/bin/env sh +if [ "$DOCKER" = "true" ]; then + base_dir="/app" +else + source="${BASH_SOURCE}" + base_dir=$(dirname $(dirname "$source")) +fi echo "Checking environment..." script=scripts/preinstall