Skip to content

Commit

Permalink
build: replace NODE_ENV with pnpm xxx --prod
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 12, 2024
1 parent 135d886 commit 36c0a90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ services:
APP_VERSION: ${GIT_BRANCH}
VITE_API_URL: https://${FMTM_API_DOMAIN:-api.${FMTM_DOMAIN}}
VITE_SYNC_URL: https://${FMTM_SYNC_DOMAIN:-sync.${FMTM_DOMAIN}}
NODE_ENV: development
volumes:
- fmtm_frontend:/frontend
network_mode: none
Expand Down
1 change: 0 additions & 1 deletion docker-compose.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ services:
APP_VERSION: main
VITE_API_URL: https://${FMTM_API_DOMAIN:-api.${FMTM_DOMAIN}}
VITE_SYNC_URL: https://${FMTM_SYNC_DOMAIN:-sync.${FMTM_DOMAIN}}
NODE_ENV: production
volumes:
- fmtm_frontend:/frontend
network_mode: none
Expand Down
1 change: 0 additions & 1 deletion src/Dockerfile.ui.debug
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable && corepack use [email protected]
RUN pnpm install
ENV NODE_ENV development
ENTRYPOINT ["pnpm", "run", "dev"]
12 changes: 5 additions & 7 deletions src/Dockerfile.ui.prod
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM docker.io/node:20 AS base
ARG NODE_ENV
FROM docker.io/node:20-slim AS base
ARG VITE_API_URL
ARG VITE_SYNC_URL
ENV VITE_API_URL=${VITE_API_URL} \
VITE_SYNC_URL=${VITE_SYNC_URL} \
NODE_ENV=${NODE_ENV} \
PNPM_HOME="/pnpm" \
PATH="$PATH:/pnpm"
RUN corepack enable && corepack use [email protected]
Expand All @@ -13,16 +11,16 @@ WORKDIR /app

FROM base AS manager-frontend
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN pnpm install
RUN pnpm fetch --prod
COPY frontend/ .
RUN pnpm run build --mode ${NODE_ENV}
RUN pnpm run build


FROM base AS mapper-frontend
COPY mapper/package.json mapper/pnpm-lock.yaml ./
RUN pnpm install
RUN pnpm fetch --prod
COPY mapper/ .
RUN pnpm run build --mode ${NODE_ENV}
RUN pnpm run build


FROM docker.io/rclone/rclone:1 AS prod
Expand Down

0 comments on commit 36c0a90

Please sign in to comment.