mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
modify port mapping to read from env
This commit is contained in:
@@ -13,7 +13,7 @@ services:
|
|||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
- "${PORT:-3001}:${PORT:-3001}"
|
- "${FREIGHT_API_PORT:-3001}:${FREIGHT_API_PORT:-3001}"
|
||||||
env_file:
|
env_file:
|
||||||
- apps/edr-freight-api/.env
|
- apps/edr-freight-api/.env
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: apps/edr-passenger-api/Dockerfile
|
dockerfile: apps/edr-passenger-api/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "${PORT:-4000}:${PORT:-4000}"
|
- "${PASSENGER_API_PORT:-4000}:${PASSENGER_API_PORT:-4000}"
|
||||||
env_file:
|
env_file:
|
||||||
- apps/edr-passenger-api/.env
|
- apps/edr-passenger-api/.env
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ services:
|
|||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
- "${PORT:-5173}:80"
|
- "${FREIGHT_PORTAL_PORT:-5173}:80"
|
||||||
|
|
||||||
freight-backoffice:
|
freight-backoffice:
|
||||||
build:
|
build:
|
||||||
@@ -51,7 +51,7 @@ services:
|
|||||||
secrets:
|
secrets:
|
||||||
- npmrc
|
- npmrc
|
||||||
ports:
|
ports:
|
||||||
- "${PORT:-5183}:80"
|
- "${FREIGHT_BACKOFFICE_PORT:-5183}:80"
|
||||||
|
|
||||||
passenger-portal:
|
passenger-portal:
|
||||||
build:
|
build:
|
||||||
@@ -62,7 +62,7 @@ services:
|
|||||||
APP_PATH: apps/edr-passenger-web/portal
|
APP_PATH: apps/edr-passenger-web/portal
|
||||||
VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000}
|
VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000}
|
||||||
ports:
|
ports:
|
||||||
- "${PORT:-5174}:80"
|
- "${PASSENGER_PORTAL_PORT:-5174}:80"
|
||||||
|
|
||||||
passenger-backoffice:
|
passenger-backoffice:
|
||||||
build:
|
build:
|
||||||
@@ -73,7 +73,7 @@ services:
|
|||||||
APP_PATH: apps/edr-passenger-web/backoffice
|
APP_PATH: apps/edr-passenger-web/backoffice
|
||||||
VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000}
|
VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000}
|
||||||
ports:
|
ports:
|
||||||
- "${PORT:-5184}:80"
|
- "${PASSENGER_BACKOFFICE_PORT:-5184}:80"
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
npmrc:
|
npmrc:
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ for service in "$@"; do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [[ -n "${GITHUB_ENV:-}" ]]; then
|
if [[ -n "${GITHUB_ENV:-}" ]]; then
|
||||||
# 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}"
|
||||||
# fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Optional build-time variables (VITE_API_URL, etc.)
|
# Optional build-time variables (VITE_API_URL, etc.)
|
||||||
|
|||||||
Reference in New Issue
Block a user