Skip to content

Commit

Permalink
fix: Web dockerfile and updated deployment workflows (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik authored Jul 9, 2024
2 parents e28708b + 9ff7486 commit 1a3c3dd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ jobs:
- name: Run Docker Compose Up
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME_QA }}@${{ secrets.SSH_HOST_QA }} \
"cd ${{ secrets.SSH_PATH_QA }} && docker compose up --pull always -d"
"cd ${{ secrets.SSH_PATH_QA }} && sudo docker compose up --pull always -d && sudo docker image prune -a -f"
2 changes: 1 addition & 1 deletion .github/workflows/deploy-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
- name: Run Docker Compose Up
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME_QA }}@${{ secrets.SSH_HOST_QA }} \
"cd ${{ secrets.SSH_PATH_QA }} && sudo docker compose up --pull always -d"
"cd ${{ secrets.SSH_PATH_QA }} && sudo docker compose up --pull always -d && sudo docker image prune -a -f"
6 changes: 6 additions & 0 deletions apps/web/.sentryclirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[auth]
token=

[defaults]
project=impler-web
org=Impler
25 changes: 12 additions & 13 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@ FROM node:20.13.1-slim

WORKDIR /usr/src/app

RUN npm i -g \
[email protected] \
[email protected]
RUN npm i -g [email protected] [email protected]

COPY .npmrc .
COPY package.json .

COPY apps/web ./apps/web
COPY apps/web/.example.env ./apps/web/.env
COPY libs/shared ./libs/shared
COPY packages/react ./packages/react
COPY pnpm-lock.yaml .

COPY tsconfig.json .
COPY tsconfig.base.json .

COPY nx.json .
COPY pnpm-workspace.yaml .

COPY .eslintrc.js .
COPY .prettierrc .
COPY .prettierignore .
COPY nx.json .
COPY pnpm-workspace.yaml .
COPY pnpm-lock.yaml .

ENV NEXT_TELEMETRY_DISABLED 1
COPY apps/web ./apps/web
COPY apps/web/.example.env ./apps/web/.env
COPY libs/shared ./libs/shared
COPY packages/react ./packages/react

ENV NEXT_TELEMETRY_DISABLED=1

RUN pnpm i
RUN pnpm build

CMD [ "pnpm", "start:static:web" ]
CMD ["pnpm", "start:static:web"]

0 comments on commit 1a3c3dd

Please sign in to comment.