mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2024-12-25 10:28:22 +01:00
Merge remote-tracking branch 'remotes/origin/0.14.16'
This commit is contained in:
commit
5bc0e128f1
@ -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
|
||||
|
||||
|
@ -2,9 +2,14 @@
|
||||
|
||||
SAVES=/opt/factorio/saves
|
||||
|
||||
if [ ! -f $SAVES/*.zip ]
|
||||
then
|
||||
/opt/factorio/bin/x64/factorio --create $SAVES/save.zip
|
||||
if ! find $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then
|
||||
#if [ -z $(find $SAVES -iname \*.zip -mindepth 1 -print | grep -q .) ]; then
|
||||
/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 \
|
||||
--port 34197 \
|
||||
--start-server-load-latest \
|
||||
--server-settings /opt/factorio/data/server-settings.json
|
||||
|
18
map-gen-settings.example.json
Normal file
18
map-gen-settings.example.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"_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"}
|
||||
}
|
||||
}
|
14
run.sh
14
run.sh
@ -1,6 +1,12 @@
|
||||
mkdir -p /tmp/factorio
|
||||
mkdir -p /tmp/factorio/mods
|
||||
mkdir -p /tmp/factorio/saves
|
||||
cp -n server-settings.example.json /tmp/factorio/server-settings.json
|
||||
cp -n map-gen-settings.example.json /tmp/factorio/map-gen-settings.json
|
||||
sudo docker run --rm -it \
|
||||
-v /home/vagrant/docker_factorio_server/server-settings.json:/opt/factorio/data/server-settings.json \
|
||||
-v /data/mods:/opt/factorio/mods \
|
||||
-v /data/saves:/opt/factorio/saves \
|
||||
-v /tmp/factorio/server-settings.json:/opt/factorio/data/server-settings.json \
|
||||
-v /tmp/factorio/map-gen-settings.json:/opt/factorio/data/map-gen-settings.json \
|
||||
-v /tmp/factorio/mods:/opt/factorio/mods \
|
||||
-v /tmp/factorio/saves:/opt/factorio/saves \
|
||||
--name factorio \
|
||||
factorio
|
||||
factorio "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user