mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 02:30:55 +00:00
@@ -60,7 +60,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
TURBO_FILTER: "@edr/passenger-portal"
|
TURBO_FILTER: "@edr/passenger-portal"
|
||||||
APP_PATH: apps/edr-passenger-web/portal
|
APP_PATH: apps/edr-passenger-web/portal
|
||||||
VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000}
|
NEXT_PUBLIC_API_URL: ${PASSENGER_API_URL:-http://localhost:4000}
|
||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
@@ -73,7 +73,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
TURBO_FILTER: "@edr/passenger-backoffice"
|
TURBO_FILTER: "@edr/passenger-backoffice"
|
||||||
APP_PATH: apps/edr-passenger-web/backoffice
|
APP_PATH: apps/edr-passenger-web/backoffice
|
||||||
VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000}
|
NEXT_PUBLIC_API_URL: ${PASSENGER_API_URL:-http://localhost:4000}
|
||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
ARG TURBO_FILTER=@edr/freight-portal
|
ARG TURBO_FILTER=@edr/freight-portal
|
||||||
ARG APP_PATH=apps/edr-freight-web/portal
|
ARG APP_PATH=apps/edr-freight-web/portal
|
||||||
ARG VITE_API_URL=http://localhost:3001/api
|
ARG VITE_API_URL=http://localhost:3001/api
|
||||||
|
ARG NEXT_PUBLIC_API_URL=http://localhost:4000
|
||||||
|
|
||||||
FROM node:24.15.0-alpine AS base
|
FROM node:24.15.0-alpine AS base
|
||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
@@ -25,7 +26,9 @@ FROM base AS builder
|
|||||||
ARG TURBO_FILTER
|
ARG TURBO_FILTER
|
||||||
ARG APP_PATH
|
ARG APP_PATH
|
||||||
ARG VITE_API_URL
|
ARG VITE_API_URL
|
||||||
|
ARG NEXT_PUBLIC_API_URL
|
||||||
ENV VITE_API_URL=${VITE_API_URL}
|
ENV VITE_API_URL=${VITE_API_URL}
|
||||||
|
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||||||
COPY --from=installer /app/ .
|
COPY --from=installer /app/ .
|
||||||
COPY --from=pruner /app/out/full/ .
|
COPY --from=pruner /app/out/full/ .
|
||||||
|
|
||||||
@@ -41,9 +44,8 @@ RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm turbo build --filter="${TURBO_
|
|||||||
exit 1)
|
exit 1)
|
||||||
|
|
||||||
# Verify build output exists before proceeding
|
# Verify build output exists before proceeding
|
||||||
# Check for .next directory (Next.js) or dist directory (Vite/other)
|
RUN if [ ! -d "/app/${APP_PATH}/dist" ] && [ ! -d "/app/${APP_PATH}/out" ]; then \
|
||||||
RUN if [ ! -d "/app/${APP_PATH}/.next" ] && [ ! -d "/app/${APP_PATH}/dist" ]; then \
|
echo "ERROR: Build output directory not found at /app/${APP_PATH}/dist or /app/${APP_PATH}/out"; \
|
||||||
echo "ERROR: Build output directory not found at /app/${APP_PATH}/.next or /app/${APP_PATH}/dist"; \
|
|
||||||
echo "Contents of /app/${APP_PATH}:"; \
|
echo "Contents of /app/${APP_PATH}:"; \
|
||||||
ls -la /app/${APP_PATH}/ 2>/dev/null || echo "Directory does not exist"; \
|
ls -la /app/${APP_PATH}/ 2>/dev/null || echo "Directory does not exist"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
|
|||||||
Reference in New Issue
Block a user