mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2024-11-07 03:07:24 +01:00
specify location of settings
This commit is contained in:
parent
44f5ffd6b4
commit
16602ba40b
@ -13,7 +13,9 @@ RUN apk --update add bash curl && \
|
||||
-o /tmp/factorio_headless_x64_$VERSION.tar.gz && \
|
||||
echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.gz" | sha1sum -c && \
|
||||
tar xzf /tmp/factorio_headless_x64_$VERSION.tar.gz --directory /opt && \
|
||||
rm /tmp/factorio_headless_x64_$VERSION.tar.gz
|
||||
rm /tmp/factorio_headless_x64_$VERSION.tar.gz && \
|
||||
cp /opt/factorio/data/server-settings.example.json /opt/factorio/data/server-settings.json && \
|
||||
cp /opt/factorio/data/map-gen-settings.example.json /opt/factorio/data/map-gen-settings.json
|
||||
|
||||
VOLUME /opt/factorio/saves /opt/factorio/mods
|
||||
|
||||
|
@ -4,7 +4,11 @@ SAVES=/opt/factorio/saves
|
||||
|
||||
if [ ! -f $SAVES/*.zip ]
|
||||
then
|
||||
/opt/factorio/bin/x64/factorio --create $SAVES/save.zip
|
||||
/opt/factorio/bin/x64/factorio \
|
||||
--create $SAVES/save.zip \
|
||||
--map-gen-settings /opt/factorio/data/map-gen-settings.json
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio --start-server-load-latest
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--start-server-load-latest \
|
||||
--server-settings /opt/factorio/data/server-settings.json
|
||||
|
24
map-gen-settings.example.json
Normal file
24
map-gen-settings.example.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"_comment": "Sizes can be specified as none, very-low, low, normal,
|
||||
high, very-high",
|
||||
"terrain_segmentation": "normal",
|
||||
"water": "normal",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"starting_area": "normal",
|
||||
"peaceful_mode": false,
|
||||
"autoplace_controls":
|
||||
{
|
||||
"coal": {"frequency": "very-low", "size": "high", "richness": "high"},
|
||||
"copper-ore": {"frequency": "very-low", "size": "high", "richness":
|
||||
"high"},
|
||||
"crude-oil": {"frequency": "normal", "size": "high", "richness":
|
||||
"high"},
|
||||
"enemy-base": {"frequency": "low", "size": "normal", "richness":
|
||||
"normal"},
|
||||
"iron-ore": {"frequency": "very-low", "size": "high", "richness":
|
||||
"high"},
|
||||
"stone": {"frequency": "very-low", "size": "normal", "richness":
|
||||
"normal"}
|
||||
}
|
||||
}
|
1
run.sh
1
run.sh
@ -1,5 +1,6 @@
|
||||
sudo docker run --rm -it \
|
||||
-v /home/vagrant/docker_factorio_server/server-settings.json:/opt/factorio/data/server-settings.json \
|
||||
-v /home/vagrant/docker_factorio_server/map-gen-settings.json:/opt/factorio/data/map-gen-settings.json \
|
||||
-v /data/mods:/opt/factorio/mods \
|
||||
-v /data/saves:/opt/factorio/saves \
|
||||
--name factorio \
|
||||
|
Loading…
Reference in New Issue
Block a user