Strip dead Windows-only code paths, add LTO/march build flags, seed default GM account

Removes now-unreachable #ifdef _WIN32 branches across Common/ and the three
server binaries (all builds are Linux-only), deletes the entirely unused
SEH exception-handling shim and an orphaned vendored MySQL client header.
Enables LTO and -march=x86-64-v2 in Release builds for a small free perf win.

Also seeds a default GM account (gmadmin/changeme) via
database sql files/gm_account.sql so a fresh deploy has something to log
into the web admin panel with, switches the MariaDB data directory from a
Docker named volume to a host bind mount for visibility/backup, and expands
the README with a fuller Docker deployment walkthrough.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ThomasandClaude Sonnet 5 committed 2026-07-10 15:42:36 +02:00
1 parent 1e47731d7a
commit 1998bf4273
27 files changed
+101 -1178

No files matched your search

+39
View File
@@ -9,11 +9,20 @@ shimmed out so it builds and runs correctly under Linux/glibc/POSIX threads.
## Quick start
Needs Docker + the Compose plugin (`docker compose version` should work) on the host. Nothing else — the C++ servers,
their build toolchain, and the database all live inside the containers.
```sh
git clone <this repo> ross && cd ross
cp .env.example .env # edit PUBLIC_HOST at minimum if clients connect from another machine
docker compose up -d --build
```
`docker compose up -d --build` builds the `rose-server` image (compiles all three C++ servers inside a throwaway
builder stage, see `Dockerfile`), then starts every service in `docker-compose.yml` in the background. First start
takes a minute or two (compiling + MariaDB initializing and loading `database sql files/`); `docker compose logs -f`
to watch it happen.
That brings up:
| Service | Container | Port | What it is |
@@ -28,6 +37,36 @@ That brings up:
Point a KTRose pre-evo client at `PUBLIC_HOST:29000` and log in — `LOGIN_CREATE_ACCOUNT=1` (the default) auto-creates an
account on first login with that username/password.
A default GM account is seeded into a fresh database by `database sql files/gm_account.sql`:
- username `gmadmin`, password `changeme`, `accesslevel 900` — logs into both the game (as a GM) and the web admin
panel below. **Change this password** (via the web admin panel, or `docker compose exec db mariadb ...`) on anything
other than a throwaway local instance — it's a public default sitting in git.
### `docker-compose.yml`, briefly
- `x-app` at the top is a YAML anchor: a template block (image, restart policy, the full list of `environment:`
variables read from `.env`) that `loginserver`, `charserver`, and `worldserver` each pull in with `<<: *app` so the
three definitions don't repeat themselves. They differ only in `command:` (which server to run) and which port they
publish.
- `db` is stock MariaDB; anything in `database sql files/` gets executed once, alphabetically, the first time the
container starts with an empty data volume (mounted read-only at `/docker-entrypoint-initdb.d`, MariaDB's standard
init-script hook). If you change schema files after the first start, they won't re-run automatically — either
`docker compose down -v` to wipe the `db-data` volume and reinitialize, or apply the change by hand.
- `webtools` (nginx) is what clients' browsers hit; it serves the static GM toolbox directly and reverse-proxies
`/admin/*` to the `webadmin` container, which isn't published to the host itself.
- `.env` (copied from `.env.example`) is where every port, server name, and shared inter-server password gets set —
`docker-compose.yml` itself should not need editing for a normal deploy.
Useful commands once it's up:
```sh
docker compose logs -f worldserver # tail one server's logs
docker compose restart worldserver # restart just one service (or use the webadmin Server tab)
docker compose down # stop everything, keep the DB volume
docker compose down -v # stop everything AND wipe the database
```
## Web tools — `http://<host>/`
A static, no-build-step GM toolbox, generated from the same STB/DB data the server itself reads: