Old School Ops

Docker deployment for RF Online

In progress RF Online: Golden Age IDEA-2 proposed by asteriagame ·

Response from the team

Confirmed, will implement docker workflow.

Ron ·

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.

Comments 3

Ron Administrator
1d ago

Thanks a lot for this. I'll work on adding native docker support so this is out of the box. I really appreciate you doing the legwork and even offering the repo directly.

Linux workflow has been on my todo list but I haven't had a lot of feedback on it yet. I'll go ahead and address some other items as well like non-docker installer scripts and a few other things that will make linux setup a lot easier for people.

👍❤️ DT and 1 other
1d ago

Thank you so much for your work! What you've done and made the server/client accessible to everyone is just incredible! If you need any help developing pipelines, Docker images, scripts, or with testing, I'm ready to help. It's possible that my version might be used by someone until the official release.

👍❤️ DT and 1 other
Ron Administrator
1d ago · edited

I am still working on figuring out the best way to bring others into helping. Right now I am working on a module system that will allow people to completely customize the game without needing source. I am working on the AI tooling around it all as well. I hope to have it all released this weekend.

Definitely stay in touch as stuff progresses.

👍 DT and 1 other

Sign in to comment.

Top xp sources

How xp works
Loading…

Open the full search page