Skip to content

Commit

Permalink
Merge pull request #236 from MTES-MCT/v0.2.3.1
Browse files Browse the repository at this point in the history
Inject ENV_PROFILE to the images
  • Loading branch information
louptheron committed Mar 25, 2021
2 parents 4ff7325 + 9f7826f commit 9000eff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test-front:

# CI commands - app
docker-build:
docker build --no-cache -f infra/docker/DockerfileBuildApp . -t monitorfish-app:$(VERSION) --build-arg VERSION=$(VERSION) --build-arg GITHUB_SHA=$(GITHUB_SHA)
docker build --no-cache -f infra/docker/DockerfileBuildApp . -t monitorfish-app:$(VERSION) --build-arg VERSION=$(VERSION) --build-arg ENV_PROFILE=$(ENV_PROFILE) --build-arg GITHUB_SHA=$(GITHUB_SHA)
docker-tag:
docker tag monitorfish-app:$(VERSION) docker.pkg.github.com/mtes-mct/monitorfish/monitorfish-app:$(VERSION)
docker-push:
Expand Down
12 changes: 9 additions & 3 deletions infra/docker/DockerfileBuildApp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#####################
# Multi stage build #
#####################
Expand Down Expand Up @@ -30,7 +31,9 @@ RUN mvn clean package -DskipTests=true
FROM ubuntu:18.04 as buildFront

ENV DEBIAN_FRONTEND=noninteractive
ENV REACT_APP_ENV=dev

ARG ENV_PROFILE
ENV REACT_APP_ENV $ENV_PROFILE

RUN echo ${REACT_APP_ENV}

Expand Down Expand Up @@ -62,8 +65,11 @@ FROM azul/zulu-openjdk-alpine:11

ARG VERSION
ENV VERSION $VERSION
ENV ENV_PROFILE=dev
ENV REACT_APP_ENV=dev

ARG ENV_PROFILE
ENV ENV_PROFILE $ENV_PROFILE

ENV REACT_APP_ENV $ENV_PROFILE
ENV ENV_DB_URL=

# Add bash
Expand Down

0 comments on commit 9000eff

Please sign in to comment.