/factorio-rotation

Automates the factoriotools/factorio docker container by refreshing the current map/factory at a set interval

Primary LanguagePHPMIT LicenseMIT

Factorio Rotation

Automates the factoriotools/factorio (source) docker container by refreshing the current map/factory at a set interval. This project provides a configuration and set of scripts that allow a user to maintain a Factorio server easily.

Both the upstream project and this project are MIT-licensed. See LICENSE for more info.

Quick Start

  1. Clone this repository: git clone https://github.com/carlbennett/factorio-rotation.git /opt/rotate-factorio
  2. Copy rotate-factorio.timer and rotate-factorio.service to /etc/systemd/system, change the timer interval (see OnCalendar=) to your preference.
  3. Edit config.php to your preferences.
  4. Reload systemd and enable the timer and service: systemctl daemon-reload && systemctl enable rotate-factorio.timer && systemctl enable rotate-factorio.service
  5. Start the rotation timer: systemctl start rotate-factorio.timer

Requirements

  • A Linux server running SystemD, such as a modern version of Fedora/CentOS/RHEL
  • Docker
  • Bash
  • The php-cli and php-json packages, for using config.php *

* I plan to convert this script to a more native language at a future date, so that php-cli is no longer required.