diff --git a/Makefile b/Makefile index 3364082eaf..bc627dc1a1 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/infra/docker/DockerfileBuildApp b/infra/docker/DockerfileBuildApp index 283ef40486..bf9a3ea2b1 100644 --- a/infra/docker/DockerfileBuildApp +++ b/infra/docker/DockerfileBuildApp @@ -31,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} @@ -63,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