Skip to content

Commit

Permalink
chore: enabled DEBUG build in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Jul 17, 2024
1 parent d228233 commit 1feb48e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ RUN yarn install
ARG APP
ARG FLAVOR
ARG BUILD_NUMBER
ARG DEBUG

ENV BUILD_NUMBER=$BUILD_NUMBER
ENV NODE_APP_INSTANCE=$FLAVOR
ENV DEBUG=$DEBUG

# Setup app & cleanup workspace
WORKDIR /opt/kalisio/
Expand Down
12 changes: 12 additions & 0 deletions scripts/build_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,25 @@ echo "Will use kli file $KLI_FILE to install and link modules ..."
IMAGE_NAME="$KALISIO_DOCKERHUB_URL/kalisio/$APP"
IMAGE_TAG="$VERSION-$FLAVOR"

case "$FLAVOR" in
"prod")
;;
"test")
;;
*)
# Suppress minification in dev mode
DEBUG=1
;;
esac

begin_group "Building container $IMAGE_NAME:$IMAGE_TAG ..."

docker login --username "$KALISIO_DOCKERHUB_USERNAME" --password-stdin "$KALISIO_DOCKERHUB_URL" < "$KALISIO_DOCKERHUB_PASSWORD"
# DOCKER_BUILDKIT is here to be able to use Dockerfile specific dockerginore (app.Dockerfile.dockerignore)
DOCKER_BUILDKIT=1 docker build \
--build-arg APP="$APP" \
--build-arg FLAVOR="$FLAVOR" \
--build-arg DEBUG="$DEBUG" \
--build-arg BUILD_NUMBER="$(get_git_commit_short_sha "$ROOT_DIR")" \
-f app.Dockerfile \
-t "$IMAGE_NAME:$IMAGE_TAG" \
Expand Down

0 comments on commit 1feb48e

Please sign in to comment.