Skip to content

Commit

Permalink
Switch to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
akmatoff committed Nov 1, 2024
1 parent ca34ca0 commit 79d7add
Show file tree
Hide file tree
Showing 5 changed files with 7,473 additions and 14,339 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
- name: Build docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/backoffice \
--build-arg VITE_BASE_URL=${{ secrets.VITE_BASE_URL }} \
--target=production .
--build-arg VITE_BASE_URL=${{ secrets.VITE_BASE_URL }} .
- name: Push docker image to Docker Hub
run: docker push ${{ secrets.DOCKER_USERNAME }}/backoffice:latest

Expand All @@ -47,4 +46,4 @@ jobs:
docker stop backoffice;
docker rm backoffice;
docker pull akmatoff/backoffice:latest;
docker run --restart always -d -p 4000:4000 --name backoffice akmatoff/backoffice:latest
docker run --restart always -d -p 4000:4000 --name backoffice akmatoff/backoffice:latest
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,21 @@

FROM node:20.18.0-slim AS base

RUN corepack enable
RUN corepack prepare pnpm@latest --activate

WORKDIR /backoffice

ARG VITE_BASE_URL

ENV VITE_BASE_URL=${VITE_BASE_URL}

COPY package*.json /backoffice/
COPY package.json .npmrc pnpm-lock.yaml /backoffice/

RUN npm install
RUN pnpm install --frozen-lockfile

COPY . .

# Development

FROM base AS dev

ENV NODE_ENV=development

EXPOSE 4000

CMD ["npm", "run", "dev"]

# Production

FROM base AS production
Expand Down
Loading

0 comments on commit 79d7add

Please sign in to comment.