From 5bb3bd5dfcbda72b2324bcaa8cf5515bc29a74bd Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Jan 2022 13:36:15 -0500 Subject: [PATCH] first decent version --- .gitignore | 2 - README.md | 23 +++++++++ docker-compose.yml | 10 ++-- factorio_vol/config/rconpw | 2 +- factorio_vol/config/server-settings.json | 4 +- factorio_vol/factorio-current.log | 57 ---------------------- factorio_vol/factorio-previous.log | 23 --------- factorio_vol/mods/mod-list.json | 60 ++++++++++++++++++++++++ factorio_vol/player-data.json | 29 +++++++++++- modlist.md | 12 +++++ prepare.sh | 1 + 11 files changed, 132 insertions(+), 91 deletions(-) delete mode 100644 .gitignore mode change 100755 => 100644 factorio_vol/factorio-current.log mode change 100755 => 100644 factorio_vol/factorio-previous.log mode change 100755 => 100644 factorio_vol/mods/mod-list.json create mode 100644 modlist.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d737a67..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -factorio_vol/config/rconpw - diff --git a/README.md b/README.md index ec10f21..a7a28a5 100644 --- a/README.md +++ b/README.md @@ -10,5 +10,28 @@ Place your save in **factorio_vol/saves/** as **main_save.zip** Something something place in **factorio_vol/mods** +1. Download them from: https://mods.factorio.com/ + +2. Move them to the mods folder (KEEP THEM IN **.ZIP** FORMAT) + +3. Run `chmod -R 845:845 ./factorio_vol/mods` OR run the script **prepare.sh** + +4. Finally (but optional), modify the file **?** and introduce your account token, this will enable the server to check for mod updates on boot, and in case of finding an update for the mods, update them automatically. + +5. On booting will generate the file **mod-list.json**, from this file one can enable/disable installed mods, by default new mods installed appear as *enabled* + +6. In case of a mod not being installed, check for it's dependencies and install them. ## Change the content of the file **factorio_vol/config/rconpw** + +Not necessary if **RCON** it's not enabled/port published + +## Docker-compose.yaml + +Joins a container network that hides behind a reverse proxy + +# More info: + +(I don't own that repository) + +https://github.com/factoriotools/factorio-docker diff --git a/docker-compose.yml b/docker-compose.yml index 8e8caf0..505a1fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,10 @@ networks: services: factorio: - image: factoriotools/factorio - container_name: factorio - ports: - - 34197:34197/udp + image: factoriotools/factorio:stable + container_name: factorio_cont +# ports: +# - 34197:34197/udp # - 27015:27015/tcp volumes: @@ -19,6 +19,6 @@ services: # https://github.com/factoriotools/factorio-docker#environment-variables environment: - GENERATE_NEW_SAVE: "false" LOAD_LATEST_SAVE: "true" SAVE_NAME: main_save + UPDATE_MODS_ON_START: "true" diff --git a/factorio_vol/config/rconpw b/factorio_vol/config/rconpw index 707e5cd..15202f3 100755 --- a/factorio_vol/config/rconpw +++ b/factorio_vol/config/rconpw @@ -1 +1 @@ -theeyaeChoote6nZz +YourSecureToken diff --git a/factorio_vol/config/server-settings.json b/factorio_vol/config/server-settings.json index f78bb16..ef2cf8b 100755 --- a/factorio_vol/config/server-settings.json +++ b/factorio_vol/config/server-settings.json @@ -1,5 +1,5 @@ { - "name": "Boobacord server", + "name": "Lorem Ipsum Server, "description": "Lorem ipsum", "tags": ["game", "tags"], @@ -11,7 +11,7 @@ "visibility": { "public": false, - "lan": true + "lan": false }, "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public", diff --git a/factorio_vol/factorio-current.log b/factorio_vol/factorio-current.log old mode 100755 new mode 100644 index f68fda5..e69de29 --- a/factorio_vol/factorio-current.log +++ b/factorio_vol/factorio-current.log @@ -1,57 +0,0 @@ - 0.000 2022-01-02 15:52:41; Factorio 1.1.50 (build 59278, linux64, headless) - 0.000 Operating system: Linux - 0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "34197" "--server-settings" "/factorio/config/server-settings.json" "--server-banlist" "/factorio/config/server-banlist.json" "--rcon-port" "27015" "--server-whitelist" "/factorio/config/server-whitelist.json" "--use-server-whitelist" "--server-adminlist" "/factorio/config/server-adminlist.json" "--rcon-password" "--server-id" "/factorio/config/server-id.json" "--start-server-load-latest" - 0.000 Read data path: /opt/factorio/data - 0.000 Write data path: /factorio [1854625/3754531MB] - 0.000 Binaries path: /opt/factorio/bin - 0.008 System info: [CPU: AMD FX(tm)-8350 Eight-Core Processor, 8 cores, RAM: 15778 MB] - 0.008 Environment: DISPLAY= WAYLAND_DISPLAY= DESKTOP_SESSION= XDG_SESSION_DESKTOP= XDG_CURRENT_DESKTOP= __GL_FSAA_MODE= __GL_LOG_MAX_ANISO= __GL_SYNC_TO_VBLANK= __GL_SORT_FBCONFIGS= __GL_YIELD= - 0.008 Running in headless mode - 0.012 Loading mod core 0.0.0 (data.lua) - 0.066 Loading mod base 1.1.50 (data.lua) - 0.395 Loading mod base 1.1.50 (data-updates.lua) - 0.533 Checksum for core: 1625176034 - 0.533 Checksum of base: 321760681 - 0.826 Prototype list checksum: 3034860339 - 0.899 Info PlayerData.cpp:71: Local player-data.json available, timestamp 1641138761 - 0.899 Info PlayerData.cpp:78: Cloud player-data.json unavailable - 0.900 Factorio initialised - 0.905 Info ServerSynchronizer.cpp:29: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0). - 0.905 Info ServerMultiplayerManager.cpp:797: updateTick(4294967295) changing state from(Ready) to(PreparedToHostGame) - 0.905 Info ServerMultiplayerManager.cpp:797: updateTick(4294967295) changing state from(PreparedToHostGame) to(CreatingGame) - 0.905 Loading map /factorio/saves/_autosave1.zip: 557756 bytes. - 0.920 Loading level.dat: 997147 bytes. - 0.925 Info Scenario.cpp:198: Map version 1.1.50-1 - 0.950 Loading script.dat: 1171 bytes. - 0.954 Checksum for script /factorio/temp/currently-playing/control.lua: 3795083680 - 0.956 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:34197})) - 0.956 Hosting game at IP ADDR:({0.0.0.0:34197}) - 0.957 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=4 - 1.336 Info AuthServerConnector.cpp:68: Obtained serverPadlock for serverHash (mXmrJA5Ea657a0fCxdY5isrCzXbznfed) from the auth server. - 1.336 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(CreatingGame) to(InGame) - 1.528 Info ServerRouter.cpp:657: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197, pingpong3.factorio.com:34197, pingpong4.factorio.com:34197) for own address - 1.528 Info UDPSocket.cpp:39: Opening socket for broadcast - 1.528 Error InterruptibleStdioStream.cpp:61: Got EOF on stdin; closing - 1.528 Info RemoteCommandProcessor.cpp:130: Starting RCON interface at IP ADDR:({0.0.0.0:27015}) - 1.528 Info CommandLineMultiplayer.cpp:284: Maximum segment size = 100; minimum segment size = 25; maximum-segment-size peer count = 10; minimum-segment-size peer count = 20 - 1.646 Info ServerRouter.cpp:540: Own address is IP ADDR:({83.44.243.138:34197}) (confirmed by pingpong1) - 1.662 Error ServerMultiplayerManager.cpp:734: Matching server connection failed: Error when creating server game: Missing token. - 1.696 Info ServerRouter.cpp:540: Own address is IP ADDR:({83.44.243.138:34197}) (confirmed by pingpong3) - 1.812 Info ServerRouter.cpp:540: Own address is IP ADDR:({83.44.243.138:34197}) (confirmed by pingpong4) - 6.007 Received SIGTERM, shutting down - 6.007 Quitting: signal. - 6.007 Info MainLoop.cpp:417: Saving map as /factorio/saves/_autosave1.zip - 6.050 Info MainLoop.cpp:428: Saving progress: 0.250000% - 6.054 Info MainLoop.cpp:428: Saving progress: 100.000000% - 6.077 Info ServerMultiplayerManager.cpp:113: Disconnecting multiplayer connection. - 6.077 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(InGame) to(DisconnectingScheduled) - 6.110 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(DisconnectingScheduled) to(Disconnecting) - 6.144 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(Disconnecting) to(Disconnected) - 6.144 Info ServerMultiplayerManager.cpp:140: Quitting multiplayer connection. - 6.144 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(Disconnected) to(Closed) - 6.347 Info UDPSocket.cpp:218: Closing socket - 6.347 Info UDPSocket.cpp:248: Socket closed - 6.347 Info UDPSocket.cpp:218: Closing socket - 6.415 Info UDPSocket.cpp:218: Closing socket - 6.415 Info UDPSocket.cpp:248: Socket closed - 6.460 Goodbye diff --git a/factorio_vol/factorio-previous.log b/factorio_vol/factorio-previous.log old mode 100755 new mode 100644 index 50abe2c..e69de29 --- a/factorio_vol/factorio-previous.log +++ b/factorio_vol/factorio-previous.log @@ -1,23 +0,0 @@ - 0.000 2022-01-02 15:52:39; Factorio 1.1.50 (build 59278, linux64, headless) - 0.000 Operating system: Linux - 0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--create" "/factorio/saves/_autosave1.zip" "--map-gen-settings" "/factorio/config/map-gen-settings.json" "--map-settings" "/factorio/config/map-settings.json" - 0.000 Read data path: /opt/factorio/data - 0.000 Write data path: /factorio [1854625/3754531MB] - 0.000 Binaries path: /opt/factorio/bin - 0.008 System info: [CPU: AMD FX(tm)-8350 Eight-Core Processor, 8 cores, RAM: 15778 MB] - 0.008 Environment: DISPLAY= WAYLAND_DISPLAY= DESKTOP_SESSION= XDG_SESSION_DESKTOP= XDG_CURRENT_DESKTOP= __GL_FSAA_MODE= __GL_LOG_MAX_ANISO= __GL_SYNC_TO_VBLANK= __GL_SORT_FBCONFIGS= __GL_YIELD= - 0.008 Running in headless mode - 0.012 Loading mod core 0.0.0 (data.lua) - 0.067 Loading mod base 1.1.50 (data.lua) - 0.398 Loading mod base 1.1.50 (data-updates.lua) - 0.537 Checksum for core: 1625176034 - 0.537 Checksum of base: 321760681 - 0.825 Prototype list checksum: 3034860339 - 0.887 Info PlayerData.cpp:73: Local player-data.json unavailable - 0.887 Info PlayerData.cpp:78: Cloud player-data.json unavailable - 0.888 Factorio initialised - 0.888 Info Main.cpp:740: Creating new map /factorio/saves/_autosave1.zip - 1.812 Loading level.dat: 997127 bytes. - 1.812 Info Scenario.cpp:198: Map version 1.1.50-1 - 1.840 Checksum for script /factorio/temp/currently-playing/control.lua: 3795083680 - 1.969 Goodbye diff --git a/factorio_vol/mods/mod-list.json b/factorio_vol/mods/mod-list.json old mode 100755 new mode 100644 index 95a6869..aa1fe63 --- a/factorio_vol/mods/mod-list.json +++ b/factorio_vol/mods/mod-list.json @@ -6,6 +6,66 @@ { "name": "base", "enabled": true + }, + + { + "name": "aai-programmable-structures", + "enabled": true + }, + + { + "name": "aai-programmable-vehicles", + "enabled": true + }, + + { + "name": "aai-signals", + "enabled": true + }, + + { + "name": "aai-vehicles-chaingunner", + "enabled": true + }, + + { + "name": "aai-vehicles-flame-tank", + "enabled": true + }, + + { + "name": "aai-vehicles-flame-tumbler", + "enabled": true + }, + + { + "name": "aai-vehicles-hauler", + "enabled": true + }, + + { + "name": "aai-vehicles-laser-tank", + "enabled": true + }, + + { + "name": "aai-vehicles-miner", + "enabled": true + }, + + { + "name": "aai-vehicles-warden", + "enabled": true + }, + + { + "name": "aai-zones", + "enabled": true + }, + + { + "name": "informatron", + "enabled": true } ] } diff --git a/factorio_vol/player-data.json b/factorio_vol/player-data.json index 0251bb3..5d8a92f 100755 --- a/factorio_vol/player-data.json +++ b/factorio_vol/player-data.json @@ -523,8 +523,35 @@ "status": "locked" } }, + "last-played": + { + "type": "hosted-multiplayer", + "host-settings": + { + "server-game-data": + { + "visibility": null, + "name": "Boobacord server", + "description": "Lorem ipsum", + "max_players": 15, + "game_time_elapsed": 2739, + "has_password": false, + "tags": + [ + "game", + "tags" + ] + }, + "server-username": "", + "autosave-interval": 10, + "autosave-slots": 50, + "afk-autokick-interval": 0, + "enable-whitelist": true + }, + "save-name": "_autosave24" + }, "service-username": "", - "service-token": "", + "service-token": "b0e39ef7e82c654dc42cd93c86c8c8", "last-used-filters": { "players": "any", diff --git a/modlist.md b/modlist.md new file mode 100644 index 0000000..e9efd01 --- /dev/null +++ b/modlist.md @@ -0,0 +1,12 @@ +https://mods.factorio.com/mod/aai-programmable-structures +https://mods.factorio.com/mod/aai-zones +https://mods.factorio.com/mod/aai-vehicles-warden +https://mods.factorio.com/mod/aai-signals +https://mods.factorio.com/mod/aai-vehicles-chaingunner +https://mods.factorio.com/mod/aai-vehicles-flame-tank +https://mods.factorio.com/mod/aai-vehicles-flame-tumbler +https://mods.factorio.com/mod/aai-vehicles-hauler +https://mods.factorio.com/mod/aai-vehicles-laser-tank +https://mods.factorio.com/mod/aai-vehicles-miner +https://mods.factorio.com/mod/aai-programmable-vehicles +https://mods.factorio.com/mod/informatron diff --git a/prepare.sh b/prepare.sh index 54b55e2..5bfd919 100755 --- a/prepare.sh +++ b/prepare.sh @@ -3,3 +3,4 @@ mkdir factorio_vol chown -R 845:845 factorio_vol chmod -R 750 factorio_vol +# Finally run docker-compose up -d