Skip to content

Commit

Permalink
fix(docker): start script (#513)
Browse files Browse the repository at this point in the history
* Denote to the system environment that it is running in docker

* Fix start script to use sh instead of bash and check if in docker
  • Loading branch information
Dalethium authored Jan 11, 2024
1 parent c4d96e8 commit 978eb92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 978eb92

Please sign in to comment.