mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Docker version force use default hostname and port
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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<StatusData>({
|
||||
ffmpeg_api_enabled,
|
||||
ffmpeg_binary_enabled,
|
||||
@@ -57,6 +59,7 @@ export const handler: Handlers = {
|
||||
meilisearch_enabled,
|
||||
meilisearch,
|
||||
no_user,
|
||||
is_docker,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -8,4 +8,5 @@ export type StatusData = {
|
||||
key: string;
|
||||
};
|
||||
no_user: boolean;
|
||||
is_docker: boolean;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user