chore: remove networking config options when running under docker #3032
@@ -14,6 +14,7 @@ SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [confi
|
||||
|
||||
- `skipTutorial` affects only newly created accounts, so you may wish to change it before logging in for the first time.
|
||||
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
|
||||
- `bindAddress`, `httpPort`, `httpsPort` are related to how SpaceNinjaServer is reached on the network. Under Docker, these options are unchangable; modify your `docker-compose.yml`, instead.
|
||||
- `ircExecutable` can be provided with a relative path to an EXE which will be ran as a child process of SpaceNinjaServer.
|
||||
- `ircAddress`, `hubAddress`, and `nrsAddress` can be provided if these secondary servers are on a different machine.
|
||||
- `worldState.eidolonOverride` can be set to `day` or `night` to lock the time to day/fass and night/vome on Plains of Eidolon/Cambion Drift.
|
||||
|
||||
@@ -7,12 +7,13 @@ services:
|
||||
- ./docker-data/static-data:/app/static/data
|
||||
- ./docker-data/logs:/app/logs
|
||||
ports:
|
||||
# The lefthand value determines the port you actually connect to. Within the container, SpaceNinjaServer will always use 80 and 443 (righthand values).
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
||||
# Normally, the image is fetched from Docker Hub, but you can use the local Dockerfile by removing "image" above and adding this:
|
||||
#build: .
|
||||
# Works best when using `docker-compose up --force-recreate --build`.
|
||||
# Works best when using `docker compose up --force-recreate --build`.
|
||||
|
||||
depends_on:
|
||||
- mongodb
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -e
|
||||
|
||||
if [ ! -f conf/config.json ]; then
|
||||
jq --arg value "mongodb://mongodb:27017/openWF" '.mongodbUrl = $value' /app/config-vanilla.json > /app/conf/config.json
|
||||
jq --arg value "mongodb://mongodb:27017/openWF" '.mongodbUrl = $value | del(.bindAddress) | del(.httpPort) | del(.httpsPort)' /app/config-vanilla.json > /app/conf/config.json
|
||||
fi
|
||||
|
||||
exec npm run raw -- --configPath conf/config.json
|
||||
exec npm run raw -- --configPath conf/config.json --docker
|
||||
|
||||
@@ -2,6 +2,7 @@ interface IArguments {
|
||||
configPath?: string;
|
||||
dev?: boolean;
|
||||
secret?: string;
|
||||
docker?: boolean;
|
||||
}
|
||||
|
||||
export const args: IArguments = {};
|
||||
@@ -19,5 +20,9 @@ for (let i = 2; i < process.argv.length; ) {
|
||||
case "--secret":
|
||||
args.secret = process.argv[i++];
|
||||
break;
|
||||
|
||||
case "--docker":
|
||||
args.docker = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,11 @@ export const configRemovedOptionsKeys = [
|
||||
"relicRewardItemCountMultiplier",
|
||||
"nightwaveStandingMultiplier"
|
||||
];
|
||||
if (args.docker) {
|
||||
configRemovedOptionsKeys.push("bindAddress");
|
||||
configRemovedOptionsKeys.push("httpPort");
|
||||
configRemovedOptionsKeys.push("httpsPort");
|
||||
}
|
||||
|
||||
export const configPath = path.join(repoDir, args.configPath ?? "config.json");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user