mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix build time environment variables
This commit is contained in:
@@ -60,7 +60,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
APP_PACKAGE: "@edr/passenger-portal"
|
APP_PACKAGE: "@edr/passenger-portal"
|
||||||
APP_PATH: apps/edr-passenger-web/portal
|
APP_PATH: apps/edr-passenger-web/portal
|
||||||
NEXT_PUBLIC_API_URL: ${PASSENGER_NEXT_PUBLIC_API_URL:-http://localhost:4000}
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:4000}
|
||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
@@ -75,7 +75,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
APP_PACKAGE: "@edr/passenger-backoffice"
|
APP_PACKAGE: "@edr/passenger-backoffice"
|
||||||
APP_PATH: apps/edr-passenger-web/backoffice
|
APP_PATH: apps/edr-passenger-web/backoffice
|
||||||
NEXT_PUBLIC_API_URL: ${PASSENGER_NEXT_PUBLIC_API_URL:-http://localhost:4000}
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:4000}
|
||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
ARG APP_PACKAGE=@edr/passenger-portal
|
ARG APP_PACKAGE=@edr/passenger-portal
|
||||||
ARG APP_PATH=apps/edr-passenger-web/portal
|
ARG APP_PATH=apps/edr-passenger-web/portal
|
||||||
ARG PORT=5174
|
ARG PORT=5174
|
||||||
ARG NEXT_PUBLIC_API_URL=http://localhost:4000
|
ARG NEXT_PUBLIC_API_URL
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -60,6 +60,10 @@ for service in "$@"; do
|
|||||||
service_var=$(echo "${service}" | tr '[:lower:]-' '[:upper:]_')
|
service_var=$(echo "${service}" | tr '[:lower:]-' '[:upper:]_')
|
||||||
echo "${service_var}_PORT=${port_value}" >> "${GITHUB_ENV}"
|
echo "${service_var}_PORT=${port_value}" >> "${GITHUB_ENV}"
|
||||||
echo "Exported ${service_var}_PORT from ${src}"
|
echo "Exported ${service_var}_PORT from ${src}"
|
||||||
|
|
||||||
|
# Forward NEXT_PUBLIC_* vars so docker compose build can inject them as build args.
|
||||||
|
grep -E '^[[:space:]]*NEXT_PUBLIC_[A-Za-z0-9_]+=' "${src}" \
|
||||||
|
| sed -E 's/^[[:space:]]*//' >> "${GITHUB_ENV}" || true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user