Commit dd732c8
committed
fix: use OPENMAPX_ROOT_DIR for the admin data inventory paths
The data-workflows page in /admin/services/data showed every service as "Not built", "No OSM PBF found", "No GTFS feeds imported", "No MOTIS config" even though the data was sitting on disk and being read by the live containers. Cause: `admin-ops.ts` had its own DIY `findInfraDir()` that walked four levels up from `import.meta.url`. In the esbuild-bundled production build the dist file is at `/app/apps/api/dist/server.js`, so the walk landed on `/app` and joined `infra/docker` → `/app/infra/docker`, which doesn't exist in the container. The actual data is at `${OPENMAPX_HOST_DIR}/infra/docker/data`, bind-mounted at the same absolute path inside the container and pointed to by the existing `OPENMAPX_ROOT_DIR` env. Switch to `repoPaths()` from @openmapx/core (already used everywhere else for path resolution) which honours that env, and fall back to the relative walk only when the env isn't set and a workspace marker is reachable.1 parent 74d0144 commit dd732c8
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| |||
0 commit comments