Skip to content

Commit

Permalink
feat: port 변수화
Browse files Browse the repository at this point in the history
  • Loading branch information
miro-ring committed Mar 23, 2024
1 parent 582f3b3 commit 3f031da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
REPOSITORY: ${{ env.IMAGE_NAME }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG --build-arg PORT=3000 .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
- name: Delete old docker image in ECR
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ARG PORT

RUN corepack enable
COPY . /app
Expand All @@ -16,5 +17,5 @@ RUN pnpm run build
FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/ .
EXPOSE 3000
EXPOSE ${PORT}
CMD [ "pnpm", "start" ]

0 comments on commit 3f031da

Please sign in to comment.