Hi! I've packaged the rf2232 Linux bundle (tested with build 0.7.0) as a Docker setup and would like to offer it to the project. It doesn't modify the bundle: the images are built straight from the unpacked release.
What it does
- Small images. The gameserver (~9 MB) and webserver (~8 MB) run on scratch, since the binaries are static. A separate tools image (~54 MB, Alpine) handles setup, database work and backups. The images contain no client files, Windows binaries, live databases or backups. The servers run as a regular user, not root.
- Configured from a .env file. Every settings.cfg option is set through an environment variable (ports, DB backend and credentials, game-data mode, cookie/TLS domain, update channel, and so on). The setup step writes them into settings.cfg on each start and leaves SUPER_PASSWORD alone.
- SQLite or MySQL database. SQLite works with no extra setup. For MySQL, it can start a MySQL 8.4 container (or use your own server), create the databases and app user, rename the stock DB names to the configured ones, and apply the database-mysql schema only when it's missing.
- Launcher files filled in. The website's download page serves the launcher with the public host, game/launcher ports and update URL already in launcher.ini.
- Backups. Scheduled backups with rotation, plus manual backups and restore. SQLite is copied online with SQLite's backup API; MySQL uses mysqldump --single-transaction. A safety backup is taken before every restore. Backups use the same folder layout and backup.json format as GoMMO Manager, so the control panel shows them.
- One management script (rfctl). Commands:> up, stop, restart, status, logs, backup, restore, check-db, import (moves an existing non-Docker install into Docker), rfassets, reset-gamedata and super-password.
up waits for the gameserver to report ready, prints the DB schema state (schema_info, _import_manifest) and shows the one-time admin password.
- Optional HTTPS. Setting a domain switches the webserver to its built-in Let's Encrypt mode on ports 80/443.
Tested: a fresh SQLite install, importing an existing install's data, MySQL from first start (including the gamedata import), backup and restore on both backends, and clean shutdown on SIGTERM.
Not tested yet: getting a real Let's Encrypt certificate, and rfassets with a real client.
Things that would make containers easier upstream (suggestions, not requirements):
- A setting for the webserver's stats address. It's fixed at 127.0.0.1:29913 today, so the web container has to share the gameserver's network.
- Quoting support in settings.cfg. Values are cut at the first space and at # or //, which limits DB passwords.
- A documented location for the TLS certificate cache, so it can be kept on a volume.
- A safer first-start MySQL gamedata import. If the import is interrupted, the database is left half-filled and the server refuses to import again.
Happy to adjust it to your conventions or hand it over for the official docs. All scripts, Dockerfile and env - https://github.com/mvolotov/RF-OSO-Docker
You may have pictured this process a little differently, but so far this is the only approach I've been able to come up with that keeps all the required functionality.