Skip to content

Commit

Permalink
build-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon KP committed May 15, 2024
1 parent 224e2a4 commit 3c34d3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/angular-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
-t $ECR_REGISTRY/$AWS_ECR_NAME:$SHA_TAG \
-t $ECR_REGISTRY/$AWS_ECR_NAME:$LATEST_TAG \
-t $ECR_REGISTRY/$AWS_ECR_NAME:$ENVIRONMENT_TAG \
--build-arg ENV=dev \
-f Dockerfile \
.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/angular-new-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
-t $ECR_REGISTRY/$AWS_ECR_NAME:$SHA_TAG \
-t $ECR_REGISTRY/$AWS_ECR_NAME:$LATEST_TAG \
-t $ECR_REGISTRY/$AWS_ECR_NAME:$ENVIRONMENT_TAG \
--build-arg ENV=prod \
-f Dockerfile \
.
Expand Down
6 changes: 2 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ COPY . .

RUN npm install

# prod
RUN npm run build-prod
# dev
# RUN npm run build
ARG ENV=dev
RUN if [ "$ENV" = "prod" ]; then npm run build-prod; else npm run build; fi

FROM nginx:alpine

Expand Down

0 comments on commit 3c34d3f

Please sign in to comment.