feat: Add bind address option
This commit is contained in:
parent
cae6ba0edb
commit
e5360536f3
5 changed files with 12 additions and 2 deletions
|
@ -29,6 +29,10 @@ url: https://example.com/
|
||||||
# The port that your Calckey server should listen on.
|
# The port that your Calckey server should listen on.
|
||||||
port: 3000
|
port: 3000
|
||||||
|
|
||||||
|
# The bind host your Calckey server should listen on.
|
||||||
|
# If unspecified, the wildcard address will be using.
|
||||||
|
#bind: 127.0.0.1
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
# ┌──────────────────────────┐
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
#───┘ PostgreSQL configuration └────────────────────────────────
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,10 @@ url: "https://{{ .Values.calckey.domain }}/"
|
||||||
# The port that your Misskey server should listen on.
|
# The port that your Misskey server should listen on.
|
||||||
port: 3000
|
port: 3000
|
||||||
|
|
||||||
|
# The bind host your Calckey server should listen on.
|
||||||
|
# If unspecified, the wildcard address will be using.
|
||||||
|
#bind: 127.0.0.1
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
# ┌──────────────────────────┐
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
#───┘ PostgreSQL configuration └────────────────────────────────
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ export default function load() {
|
||||||
config.url = url.origin;
|
config.url = url.origin;
|
||||||
|
|
||||||
config.port = config.port || parseInt(process.env.PORT || "", 10);
|
config.port = config.port || parseInt(process.env.PORT || "", 10);
|
||||||
|
config.bind = config.bind || process.env.BIND;
|
||||||
|
|
||||||
mixin.version = meta.version;
|
mixin.version = meta.version;
|
||||||
mixin.host = url.host;
|
mixin.host = url.host;
|
||||||
|
|
|
@ -6,6 +6,7 @@ export type Source = {
|
||||||
feedback_url?: string;
|
feedback_url?: string;
|
||||||
url: string;
|
url: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
bind?: string;
|
||||||
disableHsts?: boolean;
|
disableHsts?: boolean;
|
||||||
db: {
|
db: {
|
||||||
host: string;
|
host: string;
|
||||||
|
|
|
@ -221,7 +221,7 @@ export const startServer = () => {
|
||||||
|
|
||||||
initializeStreamingServer(server);
|
initializeStreamingServer(server);
|
||||||
|
|
||||||
server.listen(config.port);
|
server.listen(config.port, config.bind);
|
||||||
|
|
||||||
return server;
|
return server;
|
||||||
};
|
};
|
||||||
|
@ -258,5 +258,5 @@ export default () =>
|
||||||
});
|
});
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
server.listen(config.port, resolve);
|
server.listen(config.port, config.bind, resolve);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue