chore: remove networking config options when running under docker
All checks were successful
Build / build (pull_request) Successful in 2m3s
All checks were successful
Build / build (pull_request) Successful in 2m3s
This should make it hopefully ever so slightly less confusing.
This commit is contained in:
@@ -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