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>
123 lines
3.4 KiB
YAML
123 lines
3.4 KiB
YAML
x-app: &app
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: rose-server:latest
|
|
restart: unless-stopped
|
|
environment: &app-env
|
|
DB_HOST: db
|
|
DB_PORT: "3306"
|
|
DB_USER: ${DB_USER:-rose}
|
|
DB_PASSWORD: ${DB_PASSWORD:-change_me}
|
|
DB_NAME: ${DB_NAME:-ktrose}
|
|
PUBLIC_HOST: ${PUBLIC_HOST:-127.0.0.1}
|
|
CHAR_HOST: charserver
|
|
LOGIN_PORT: ${LOGIN_PORT:-29000}
|
|
LOGIN_SERVER_NAME: ${LOGIN_SERVER_NAME:-ROSE Login}
|
|
LOGIN_CREATE_ACCOUNT: ${LOGIN_CREATE_ACCOUNT:-1}
|
|
CHAR_PORT: ${CHAR_PORT:-29100}
|
|
CHAR_S2S_PORT: ${CHAR_S2S_PORT:-29110}
|
|
CHAR_SERVER_NAME: ${CHAR_SERVER_NAME:-Server 1}
|
|
CHAR_DELETE_TIME: ${CHAR_DELETE_TIME:-3600}
|
|
WORLD_PORT: ${WORLD_PORT:-29200}
|
|
WORLD_S2S_PORT: ${WORLD_S2S_PORT:-29210}
|
|
WORLD_CHANNEL_NAME: ${WORLD_CHANNEL_NAME:-Channel 1}
|
|
WORLD_MAX_CONNECTIONS: ${WORLD_MAX_CONNECTIONS:-500}
|
|
WORLD_WELCOME_MSG: ${WORLD_WELCOME_MSG:-Welcome to ROSS}
|
|
WORLD_SAVE_TIME: ${WORLD_SAVE_TIME:-3600}
|
|
SHARED_LOGIN_PASS: ${SHARED_LOGIN_PASS:-789456}
|
|
SHARED_CHAR_PASS: ${SHARED_CHAR_PASS:-456123}
|
|
SHARED_WORLD_PASS: ${SHARED_WORLD_PASS:-321654}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
services:
|
|
db:
|
|
image: mariadb:11
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_RANDOM_ROOT_PASSWORD: "1"
|
|
MYSQL_DATABASE: ${DB_NAME:-ktrose}
|
|
MYSQL_USER: ${DB_USER:-rose}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD:-change_me}
|
|
volumes:
|
|
- "./docker/data/mysql:/var/lib/mysql"
|
|
- "./database sql files:/docker-entrypoint-initdb.d:ro"
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
loginserver:
|
|
<<: *app
|
|
command: ["login"]
|
|
ports:
|
|
- "${LOGIN_PORT:-29000}:${LOGIN_PORT:-29000}"
|
|
volumes:
|
|
- logs:/var/log/roseserver
|
|
|
|
charserver:
|
|
<<: *app
|
|
command: ["char"]
|
|
ports:
|
|
- "${CHAR_PORT:-29100}:${CHAR_PORT:-29100}"
|
|
volumes:
|
|
- logs:/var/log/roseserver
|
|
- clanmark:/data/clanmark
|
|
|
|
worldserver:
|
|
<<: *app
|
|
command: ["world"]
|
|
ports:
|
|
- "${WORLD_PORT:-29200}:${WORLD_PORT:-29200}"
|
|
volumes:
|
|
- logs:/var/log/roseserver
|
|
- "./Binary/3DData:/data/3DData:ro"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
charserver:
|
|
condition: service_started
|
|
|
|
webtools:
|
|
image: nginx:alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- "./webtools:/usr/share/nginx/html:ro"
|
|
- "./docker/conf/webtools-nginx.conf:/etc/nginx/conf.d/default.conf:ro"
|
|
depends_on:
|
|
- webadmin
|
|
|
|
webadmin:
|
|
build:
|
|
context: ./webadmin
|
|
restart: unless-stopped
|
|
environment:
|
|
DB_HOST: db
|
|
DB_PORT: "3306"
|
|
DB_USER: ${DB_USER:-rose}
|
|
DB_PASSWORD: ${DB_PASSWORD:-change_me}
|
|
DB_NAME: ${DB_NAME:-ktrose}
|
|
ADMIN_SECRET_KEY: ${ADMIN_SECRET_KEY:-change-me-too}
|
|
ADMIN_MIN_ACCESSLEVEL: ${ADMIN_MIN_ACCESSLEVEL:-900}
|
|
COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME:-ross}
|
|
volumes:
|
|
# Lets the panel start/stop/restart the login/char/world containers and
|
|
# stream their logs via the Docker API. Grants the container
|
|
# effectively root-equivalent access to the host -- acceptable here
|
|
# since the panel sits behind GM-only login and isn't internet-exposed.
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
expose:
|
|
- "8080"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
logs:
|
|
clanmark:
|