mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-06-25 11:38:00 +02:00
Add an IP bind param to the entrypoint (#447)
* Add an IP bind param to the entrypoint * Add an example usage to readme * Rename to BIND
This commit is contained in:
@ -20,3 +20,4 @@ services:
|
||||
# - USERNAME=FactorioUsername
|
||||
# - TOKEN=FactorioToken
|
||||
# - PORT=34198
|
||||
# - ADDR=::1
|
||||
|
@ -5,6 +5,7 @@ FACTORIO_VOL=/factorio
|
||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
||||
SAVE_NAME="${SAVE_NAME:-""}"
|
||||
BIND="${BIND:-""}"
|
||||
|
||||
mkdir -p "$FACTORIO_VOL"
|
||||
mkdir -p "$SAVES"
|
||||
@ -88,6 +89,10 @@ FLAGS=(\
|
||||
--server-id /factorio/config/server-id.json \
|
||||
)
|
||||
|
||||
if [ -n "$BIND" ]; then
|
||||
FLAGS+=( --bind "$BIND" )
|
||||
fi
|
||||
|
||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
||||
FLAGS+=( --start-server-load-latest )
|
||||
else
|
||||
|
Reference in New Issue
Block a user