From df234baeab8619eb02e5c1904ca2a11faf45c9c5 Mon Sep 17 00:00:00 2001 From: Merith-TK Date: Fri, 18 Jul 2025 18:46:05 -0700 Subject: [PATCH] fix the fucking readme --- Readme.md | 98 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 78 insertions(+), 20 deletions(-) diff --git a/Readme.md b/Readme.md index 2904b26..2e110c4 100644 --- a/Readme.md +++ b/Readme.md @@ -1,35 +1,93 @@ -# README for Docker Image Build and Publish Workflows + +# Resonite Headless Docker Image & CI Workflows ## Overview -This repository contains two GitHub Actions workflows that automate the building and publishing of Docker images to an OCI registry. +This repository provides a Docker image and automation scripts for running [Resonite Headless](https://resonite.com/) in a containerized environment. It includes: -### Workflows +- Dockerfile and Docker Compose setup +- Scripts for installation, configuration, and mod management +- CI workflows for automated image builds and publishing -1. **On Commit to Main** - - **Trigger:** Activates on commits to the `main` branch (tags are excluded). - - **Purpose:** Builds and publishes a Docker image for each commit. -2. **On Tag Push** - - **Trigger:** Activates when a new tag is pushed. - - **Purpose:** Builds and publishes a Docker image for the tag and tags it as `latest`. +## Quick Start -## Prerequisites +1. **Create or edit your `docker-compose.yml`:** -- **Secrets Needed:** - - `OCI_TOKEN`: Your OCI registry token. - - `OCI_USER`: Your OCI registry username. + Example: + ```yaml + services: + resonite: + image: git.merith.xyz/oci/resonite:nightly + container_name: resonite + network_mode: host # dont actually know what ports resonite needs + stdin_open: true + tty: true + volumes: + - ./data:/data:rw + - ./data/resonite:/data/resonite:rw + - ./data/steamcmd:/data/steamcmd:rw + - ./scripts:/scripts:ro ## Optional if you need an override for one of the scripts + environment: + DISABLE_STEAMCMD: false + CONFIG_FILE: "/data/Config.json" + COMMAND: "/scripts/99_start.sh" + RESONITE_MOD_LOADER: true + MOD_URLS: | + https://github.com/Raidriar796/StresslessHeadless/releases/download/2.0.0-rc1/StresslessHeadless.dll + RUN_AS: 1000 + STOP_LAUNCH: false + env_file: + - ./steamcred.env + ``` -## How to Use +2. **Configure environment variables:** + - Copy `steamcred.env` and fill in your Steam credentials (`STEAM_USER`, `STEAM_PASS`, `STEAM_AUTH`, `STEAM_BETA`). + - Edit `docker-compose.yml` to adjust options as needed (see above). -1. **Clone the Repository:** Get a local copy of this repository. -2. **Modify Dockerfile:** Update the `Dockerfile` for your application. -3. **Push Changes:** Push changes to the `main` branch or create a new tag. -4. **Check Workflow Status:** View the Actions tab in Forgjo to monitor workflow runs. +3. **Start the container:** + ```sh + docker-compose up -d + ``` -## Notes +## Quick Reference -- Ensure your Docker environment is compatible with multi-platform builds if necessary. +- **Docker image:** `git.merith.xyz/oci/resonite:nightly` +- **Repository:** https://git.merith.xyz/oci/resonite +- **Default compose file:** See example above or use the provided `docker-compose.yml`. + +## Configuration + +### Environment Variables (in `docker-compose.yml`) + +- `DISABLE_STEAMCMD`: Prevents SteamCMD from updating game files (default: false) +- `CONFIG_FILE`: Path to config file (default: `/data/Config.json`) +- `COMMAND`: Startup script (default: `/scripts/99_start.sh`) +- `RESONITE_MOD_LOADER`: Enable Resonite Mod Loader (default: false) +- `MOD_URLS`: List of mod URLs to download +- `RUN_AS`: UID:GID to run the server as (default: root) +- `STOP_LAUNCH`: If true, prevents server from starting (for debugging) + +### Steam Credentials +Set in `steamcred.env` (not tracked in git): +- `STEAM_USER`, `STEAM_PASS`, `STEAM_AUTH`, `STEAM_BETA` + +### Volumes +- `/data`: Persistent data +- `/data/resonite`: Game files +- `/data/steamcmd`: SteamCMD files + +## Scripts + +- `00_setup.sh`: Main entrypoint, sets up environment and runs install/config/mod scripts +- `01_install.sh`: Installs Resonite Headless via SteamCMD +- `02_setup_config.sh`: Sets up configuration file from template if missing +- `03_download_mods.sh`: Downloads mods and sets up mod loader if enabled +- `99_start.sh`: Starts the Resonite server + +## Mod Support + +To enable mod support, set `RESONITE_MOD_LOADER: true` and provide mod URLs in `MOD_URLS`. The scripts will download and link mods automatically. ## License