Skip to content

Commit 4a79afa

Browse files
committed
Start the Platform with its base path, which next start re-reads
The zone never became ready in CI: built with SIM_PLATFORM_BASE_PATH but started without it, next start re-reads the config and answered 404 for every route.
1 parent 0463830 commit 4a79afa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.github/scripts/http-e2e.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ start_platform() {
160160
local port=$1
161161
platform_tag="platform-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-$$"
162162
platform_log="$report_dir/platform-live-platform.log"
163-
E2E_APP="$platform_tag" SIM_PLATFORM_API_ORIGIN="$local_app_url" setsid node \
163+
E2E_APP="$platform_tag" SIM_PLATFORM_API_ORIGIN="$local_app_url" SIM_PLATFORM_BASE_PATH=/org setsid node \
164164
../../node_modules/next/dist/bin/next start platform --hostname 127.0.0.1 --port "$port" \
165165
> "$platform_log" 2>&1 &
166166
platform_pid=$!

‎apps/sim/platform/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Deployed, the Platform is a zone at `/org` on the main app's origin, so it share
2929

3030
| Variable | Set on | Purpose |
3131
| --- | --- | --- |
32-
| `SIM_PLATFORM_BASE_PATH=/org` | Platform, at build | Prefixes routes and assets |
32+
| `SIM_PLATFORM_BASE_PATH=/org` | Platform, at build and at `next start` | Prefixes routes and assets; `next start` re-reads the config, so without it every route answers 404 |
3333
| `SIM_PLATFORM_API_ORIGIN` | Platform, at runtime | Where server reads go, with the viewer's cookies |
3434
| `NEXT_PUBLIC_APP_URL` | Platform, at runtime | The main app's public origin, for login and legacy links |
3535
| `SIM_PLATFORM_ORIGIN` | Main app, at build and runtime | The `/org` rewrite is baked at build; the organization redirect reads it at runtime |

0 commit comments

Comments
 (0)