diff --git a/docker-compose.yaml b/docker-compose.yaml index c2efb1905..2438b70fa 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -13,7 +13,7 @@ services: secrets: - npmrc ports: - - "${PORT:-3001}:${PORT:-3001}" + - "${FREIGHT_API_PORT:-3001}:${FREIGHT_API_PORT:-3001}" env_file: - apps/edr-freight-api/.env @@ -22,7 +22,7 @@ services: context: . dockerfile: apps/edr-passenger-api/Dockerfile ports: - - "${PORT:-4000}:${PORT:-4000}" + - "${PASSENGER_API_PORT:-4000}:${PASSENGER_API_PORT:-4000}" env_file: - apps/edr-passenger-api/.env @@ -38,7 +38,7 @@ services: secrets: - npmrc ports: - - "${PORT:-5173}:80" + - "${FREIGHT_PORTAL_PORT:-5173}:80" freight-backoffice: build: @@ -51,7 +51,7 @@ services: secrets: - npmrc ports: - - "${PORT:-5183}:80" + - "${FREIGHT_BACKOFFICE_PORT:-5183}:80" passenger-portal: build: @@ -62,7 +62,7 @@ services: APP_PATH: apps/edr-passenger-web/portal VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000} ports: - - "${PORT:-5174}:80" + - "${PASSENGER_PORTAL_PORT:-5174}:80" passenger-backoffice: build: @@ -73,7 +73,7 @@ services: APP_PATH: apps/edr-passenger-web/backoffice VITE_API_URL: ${PASSENGER_VITE_API_URL:-http://localhost:4000} ports: - - "${PORT:-5184}:80" + - "${PASSENGER_BACKOFFICE_PORT:-5184}:80" secrets: npmrc: diff --git a/scripts/deploy/sync-env-from-server.sh b/scripts/deploy/sync-env-from-server.sh index 767a1aad2..a0618982c 100644 --- a/scripts/deploy/sync-env-from-server.sh +++ b/scripts/deploy/sync-env-from-server.sh @@ -56,11 +56,11 @@ for service in "$@"; do exit 1 fi - # if [[ -n "${GITHUB_ENV:-}" ]]; then - # service_var=$(echo "${service}" | tr '[:lower:]-' '[:upper:]_') - # echo "${service_var}_PORT=${port_value}" >> "${GITHUB_ENV}" - # echo "Exported ${service_var}_PORT from ${src}" - # fi + if [[ -n "${GITHUB_ENV:-}" ]]; then + service_var=$(echo "${service}" | tr '[:lower:]-' '[:upper:]_') + echo "${service_var}_PORT=${port_value}" >> "${GITHUB_ENV}" + echo "Exported ${service_var}_PORT from ${src}" + fi done # Optional build-time variables (VITE_API_URL, etc.)