Skip to content

Commit f2a1c9a

Browse files
authored
fix(gnore): Onboarding fixes (#26824)
1 parent 0714582 commit f2a1c9a

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

docker/docker-entrypoint.sh

-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,4 @@ fi
99

1010
echo "Using '$DATA' as data directory"
1111

12-
if [ ! -f "$DATA/configuration.yaml" ]; then
13-
echo "Creating configuration file..."
14-
cp /app/configuration.example.yaml "$DATA/configuration.yaml"
15-
fi
16-
1712
exec "$@"

lib/util/onboarding.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ function generateHtmlError(errors: string): string {
371371
}
372372

373373
function getServerUrl(): URL {
374-
return new URL(process.env.Z2M_ONBOARD_URL ?? 'http://localhost:8080');
374+
return new URL(process.env.Z2M_ONBOARD_URL ?? 'http://0.0.0.0:8080');
375375
}
376376

377377
async function startOnboardingServer(): Promise<boolean> {

test/onboarding.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ describe('Onboarding', () => {
288288
expect(resEnd).toHaveBeenCalledTimes(2);
289289
}
290290

291-
const serverUrl = new URL(process.env.Z2M_ONBOARD_URL ?? 'http://localhost:8080');
291+
const serverUrl = new URL(process.env.Z2M_ONBOARD_URL ?? 'http://0.0.0.0:8080');
292292
expect(mockHttpListen).toHaveBeenCalledWith(parseInt(serverUrl.port), serverUrl.hostname, expect.any(Function));
293293

294294
return [resEnd.mock.calls[0][0], resEnd.mock.calls[1][0]];
@@ -346,7 +346,7 @@ describe('Onboarding', () => {
346346

347347
expect(resEnd).toHaveBeenCalledTimes(2);
348348

349-
const serverUrl = new URL(process.env.Z2M_ONBOARD_URL ?? 'http://localhost:8080');
349+
const serverUrl = new URL(process.env.Z2M_ONBOARD_URL ?? 'http://0.0.0.0:8080');
350350
expect(mockHttpListen).toHaveBeenCalledWith(parseInt(serverUrl.port), serverUrl.hostname, expect.any(Function));
351351

352352
return resEnd.mock.calls[0][0];

0 commit comments

Comments
 (0)