diff --git a/config.ts b/config.ts index 4516bc4..2bb7ad0 100644 --- a/config.ts +++ b/config.ts @@ -112,6 +112,9 @@ export class Config { return this._return_bool("download_original_img") || false; } get port() { + if (isDocker()) { + return 8000; + } return this._return_number("port") || 8000; } get export_zip_jpn_title() { @@ -119,7 +122,7 @@ export class Config { } get hostname() { if (isDocker()) { - return this._return_string("hostname") || "0.0.0.0"; + return "0.0.0.0"; } return this._return_string("hostname") || "127.0.0.1"; } diff --git a/routes/api/status.ts b/routes/api/status.ts index fcb0f83..a04dd5b 100644 --- a/routes/api/status.ts +++ b/routes/api/status.ts @@ -4,6 +4,7 @@ import type { StatusData } from "../../server/status.ts"; import { get_host, return_data } from "../../server/utils.ts"; import { check_ffmpeg_binary } from "../../thumbnail/ffmpeg_binary.ts"; import type * as FFMPEG_API from "../../thumbnail/ffmpeg_api.ts"; +import { isDocker } from "../../utils.ts"; let ffmpeg_api: typeof FFMPEG_API | undefined; @@ -50,6 +51,7 @@ export const handler: Handlers = { }; } const no_user = m.db.get_user_count() === 0; + const is_docker = isDocker(); return return_data({ ffmpeg_api_enabled, ffmpeg_binary_enabled, @@ -57,6 +59,7 @@ export const handler: Handlers = { meilisearch_enabled, meilisearch, no_user, + is_docker, }); }, }; diff --git a/server/status.ts b/server/status.ts index 255d227..6ff03ba 100644 --- a/server/status.ts +++ b/server/status.ts @@ -8,4 +8,5 @@ export type StatusData = { key: string; }; no_user: boolean; + is_docker: boolean; };