mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix(docker): start script (#513)
* 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
This commit is contained in:
parent
c4d96e8ee2
commit
978eb92781
@ -22,7 +22,8 @@ ENV USER=container \
|
|||||||
HOME=/home/container \
|
HOME=/home/container \
|
||||||
NODE_ENV=production \
|
NODE_ENV=production \
|
||||||
HTTP_HOST=0.0.0.0 \
|
HTTP_HOST=0.0.0.0 \
|
||||||
HTTP_PORT=80
|
HTTP_PORT=80 \
|
||||||
|
DOCKER=true
|
||||||
WORKDIR /home/container
|
WORKDIR /home/container
|
||||||
COPY --from=builder --chown=container:container /build /app
|
COPY --from=builder --chown=container:container /build /app
|
||||||
EXPOSE ${HTTP_PORT}/tcp
|
EXPOSE ${HTTP_PORT}/tcp
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
if [ "$DOCKER" = "true" ]; then
|
||||||
source="${BASH_SOURCE}"
|
base_dir="/app"
|
||||||
base_dir=$(dirname $(dirname "$source"))
|
else
|
||||||
|
source="${BASH_SOURCE}"
|
||||||
|
base_dir=$(dirname $(dirname "$source"))
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Checking environment..."
|
echo "Checking environment..."
|
||||||
script=scripts/preinstall
|
script=scripts/preinstall
|
||||||
|
Loading…
Reference in New Issue
Block a user