Skip to content

Commit

Permalink
Merge pull request #52 from socialappslab/develop
Browse files Browse the repository at this point in the history
fix: Update Dockerfile
  • Loading branch information
zant authored Nov 4, 2024
2 parents 10ac0cc + c081bf2 commit 9635793
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
ECR_REPOSITORY: ${{ secrets.REPO_NAME_PROD }}
IMAGE_TAG: ${{ steps.package-version.outputs.version }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker build --build-arg ENV_NAME=production -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
ECR_REPOSITORY: ${{ secrets.REPO_NAME }}
IMAGE_TAG: ${{ steps.get-commit-hash.outputs.commit-hash }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker build --build-arg ENV_NAME=develop -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY package.json ./
RUN yarn install --frozen-lockfile

# Copy the rest of the application code
ARG ENV_NAME="develop"
ARG ENV_NAME
COPY . .
RUN if [ "$ENV_NAME" = "production" ]; then rm .env.development && mv .env.production .env ; fi
RUN if [ "$ENV_NAME" = "develop" ]; then rm .env.production && mv .env.development .env && echo "arg: "$ENV_NAME ; fi
Expand Down

0 comments on commit 9635793

Please sign in to comment.