Skip to content

Commit

Permalink
build: remove usage of NODE_ENV (build is always prod, required devDeps)
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 12, 2024
1 parent 135d886 commit 53dd8a4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 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"]
8 changes: 3 additions & 5 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 @@ -15,14 +13,14 @@ FROM base AS manager-frontend
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN pnpm install
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
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 53dd8a4

Please sign in to comment.