50 Commits
main ... main

Author SHA1 Message Date
63d79740ed fix: add --amend flag to docker manifest create
The manifest already exists from previous builds, so --amend is needed
to update it with new architecture images.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 17:53:21 +01:00
Codex Agent
0651098b66 fix: disable provenance to fix multi-arch manifest creation
Buildx with provenance creates manifest lists even for single-platform
builds. This breaks `docker manifest create` which expects plain images.

Adding provenance: false ensures plain images are pushed, allowing
the manifest creation step to work correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 09:16:10 +01:00
Codex Agent
d21b1e9877 ci: Add multi-arch manifest with :main tag
- arm64 build pushes :main-arm64
- amd64 build pushes :main-amd64
- New create-manifest job combines into :main (auto-selects arch)
- Manifest job can run on any self-hosted runner

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 08:37:37 +01:00
Codex Agent
b9bbe80856 ci: Use :latest tag instead of :main
- amd64: :latest and :sha-xxx
- arm64: :latest-arm64 and :sha-xxx-arm64

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 08:30:17 +01:00
Codex Agent
906d405e43 Refactor to LiamAEdwards watchdog approach
- Dockerfile: Download server from wylab CDN at build time, build watchdog
- start.sh: Simplified to copy defaults and run watchdog
- appsettings.yml: Configure for wylab instance with CDN manifest
- main.yml: Simplified workflow with auto-tagging via metadata-action
- Delete update_build_metadata.py (no longer needed)

Based on: https://github.com/LiamAEdwards/SS14-Docker-Linux-Server

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 08:21:19 +01:00
f74b25bc3c chore: Remove update_build_metadata.py (watchdog handles updates) 2025-12-16 07:44:09 +01:00
1d20c8c80d chore: Remove start.sh (watchdog is now the entrypoint) 2025-12-16 07:44:09 +01:00
1916037ff8 ci: Simplify workflow for watchdog build (no game source compilation)
Main branch now builds watchdog-only image that auto-updates from CDN.
Dev branch retains the full game source build workflow.
2025-12-16 07:43:44 +01:00
129c4bebd1 config: Update watchdog key to wylab, clean up build section 2025-12-16 07:42:52 +01:00
050061a7aa config: Update watchdog instance to wylab with CDN manifest 2025-12-16 07:42:51 +01:00
aaade96257 refactor: Switch to SS14.Watchdog for auto-updates from CDN
- Watchdog automatically downloads and updates game server from CDN manifest
- No need to rebuild image for game updates
- Game server binaries pulled from https://cdn.wylab.me/fork/wylab/manifest
- Dev branch retains the build-from-source approach
2025-12-16 07:41:49 +01:00
2d86eac066 Remove commented download_url/build examples
The update_build_metadata.py script's regex matches commented lines first,
causing duplicates. Keep only the actual values.
2025-12-16 07:15:41 +01:00
e149fceec2 Fix config path - files go to root, not publish/
The SS14.Server zip extracts files to root, not a publish/ subdirectory.
Config files were being placed in non-existent /ss14-default/publish/.
2025-12-16 07:10:13 +01:00
d91dfefec1 Add PostgreSQL database configuration
Configure SS14 server to use PostgreSQL for persistent storage.
Data persists independently of game server container rebuilds.
2025-12-16 07:04:23 +01:00
3b41aab1f5 Revert "Add MariaDB database configuration"
SS14 does not support MySQL/MariaDB, only SQLite and PostgreSQL.
Reverting to SQLite default.
2025-12-16 06:56:53 +01:00
Codex Agent
551245ab53 Add MariaDB database configuration
Configure SS14 server to use MariaDB for persistent storage
(player data, admin logs, preferences).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 06:10:55 +01:00
Wylabb
29ec3bd03e Replace GHA cache with registry cache
Switch from type=gha to type=registry for Docker build caching.
Registry cache works with Gitea runners and stores cache layers
as special tags in the container registry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:50:40 +01:00
Wylabb
3a0980b294 Remove incompatible GitHub Actions cache from workflow
Remove cache-from and cache-to settings using type=gha, which are
incompatible with Gitea runners. The build completes successfully
but fails when trying to export to the non-existent GHA cache service.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:49:33 +01:00
Wylabb
900969b9ef Fix amd64 runner to use Docker mode
Restore runs-on to [self-hosted, linux-amd64] which now maps to Docker
mode after updating the runner configuration. This fixes actions/checkout
compatibility while maintaining amd64 tagging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:25:00 +01:00
Wylabb
f1229098af Switch amd64 job to Docker runner mode
Change build-amd64 from host mode to ubuntu-latest Docker runner to
fix actions/checkout compatibility. The checkout action requires a
proper containerized environment that host mode doesn't provide.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:19:08 +01:00
Wylabb
2d7fbeb95a Fix checkout action compatibility with gitea-runner
Downgrade actions/checkout from v4 to v3 to resolve MODULE_NOT_FOUND
errors in gitea-runner's act environment. The v4 action has known
compatibility issues with act's caching mechanism.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 03:59:42 +01:00
Codex Agent
7010841d75 Point runners to macos-arm64 and linux-amd64 labels 2025-12-15 01:32:54 +01:00
Codex Agent
ad71315b41 Switch runner labels to lower-case arm64/x64 2025-12-15 01:30:46 +01:00
Codex Agent
b4155b8c0a Adjust runner labels to self-hosted ARM64/X64 2025-12-15 01:28:49 +01:00
Codex Agent
e0d3723507 Pin arm64/amd64 jobs to matching self-hosted runners 2025-12-15 01:21:27 +01:00
Codex Agent
db3c67de58 Remove QEMU setup for amd64 job 2025-12-15 01:06:10 +01:00
Codex Agent
61a392c4d3 Revert cache registry change 2025-12-15 01:02:08 +01:00
Codex Agent
d528323a9f Use registry cache for buildx 2025-12-15 01:00:54 +01:00
Codex Agent
ea4f55a8dc Auto-detect target platform 2025-12-15 00:50:55 +01:00
Codex Agent
2a615a644a CI: split arm64 and amd64 jobs 2025-12-15 00:31:53 +01:00
Codex Agent
3b0e3ae250 CI: force plain buildx progress for logging 2025-12-15 00:18:48 +01:00
Codex Agent
8633363c22 CI: cache build artifacts and configs 2025-12-14 23:33:08 +01:00
Codex Agent
59c193f954 CI: enable amd64 buildx with qemu 2025-12-14 18:45:32 +01:00
Codex Agent
8a9aaefd2a CI: build/push linux/amd64 image 2025-12-14 18:43:51 +01:00
Codex Agent
fdf43ea089 Revert "Fix shell scripts to use LF line endings"
This reverts commit f248f11f7e.
2025-12-14 18:41:41 +01:00
Codex Agent
f248f11f7e Fix shell scripts to use LF line endings 2025-12-14 18:37:33 +01:00
Codex Agent
9ba94bb69f Restrict workflow to native arch 2025-12-14 18:06:56 +01:00
Codex Agent
b74fc4298d Add buildx setup for workflow 2025-12-14 17:20:26 +01:00
Codex Agent
54fe07621e Remove host mapping step from workflow 2025-12-14 17:04:05 +01:00
Codex Agent
0ec2652886 Add client zip download helper 2025-12-14 16:51:52 +01:00
Wylabb
893f5de12b chore: trigger CI 2025-12-14 11:39:57 +01:00
Codex Agent
cd5890730a Use internal git host mapping 2025-12-14 09:31:15 +01:00
Codex Agent
842b643ecd Add git host mapping for CI 2025-12-14 09:30:09 +01:00
Codex Agent
627d147be2 Always rebuild docker image in CI 2025-12-14 09:23:41 +01:00
Codex Agent
fdef15cdf1 Support Robust.Server fallback 2025-12-14 09:19:35 +01:00
Codex Agent
da734d1ffc Fallback to Robust.Server when Watchdog absent 2025-12-14 09:16:11 +01:00
Codex Bot
8b66eca6a3 Make start script detect SS14.Watchdog path 2025-12-14 08:36:26 +01:00
Codex Bot
ec1d063d83 Use lowercase registry image name 2025-12-14 08:27:04 +01:00
Codex Bot
0fc5da9fe0 Skip redundant Docker image builds 2025-12-14 08:09:18 +01:00
Codex Bot
eb4cf5ead8 Build Docker image from wylab-station-14 source 2025-12-14 05:13:39 +01:00
6 changed files with 226 additions and 132 deletions

View File

@@ -1,48 +1,93 @@
# #
name: Create and publish a Docker image name: Build SS14 Watchdog Server
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on: on:
push: push:
branches: ['main'] branches: ['main']
workflow_dispatch:
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env: env:
REGISTRY: ghcr.io REGISTRY: git.wylab.me
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: wylab/ws14-docker-linux-server
BUILDKIT_PROGRESS: plain
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs: jobs:
build-and-push-image: build-arm64:
runs-on: ubuntu-latest runs-on: [self-hosted, macos-arm64]
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. timeout-minutes: 60
permissions: permissions:
contents: read contents: read
packages: write packages: write
#
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry - name: Set up Docker Buildx
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 uses: docker/setup-buildx-action@v3
- name: Log in to the container registry
uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker - name: Build and push Docker image (arm64)
id: meta uses: docker/build-push-action@v5
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with: with:
context: . context: .
provenance: false
platforms: linux/arm64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-arm64
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-arm64,mode=max
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-arm64
labels: ${{ steps.meta.outputs.labels }}
build-amd64:
runs-on: [self-hosted, linux-amd64]
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (amd64)
uses: docker/build-push-action@v5
with:
context: .
provenance: false
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64,mode=max
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-amd64
create-manifest:
needs: [build-amd64, build-arm64]
runs-on: [self-hosted]
steps:
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Create and push multi-arch manifest
run: |
docker manifest create --amend ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-amd64 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-arm64
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main

View File

@@ -1,24 +1,40 @@
# syntax=docker/dockerfile:1.7
#
# SS14 Watchdog Docker Image (based on LiamAEdwards/SS14-Docker-Linux-Server)
# Downloads game server from CDN and builds SS14.Watchdog
#
# Build stage # Build stage
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG TARGETPLATFORM
# Update and install necessary tools # Update and install necessary tools
RUN apt-get -y update && \ RUN apt-get -y update && \
apt-get -y install curl unzip wget git jq apt-get -y install curl unzip wget git jq
# Download and extract SS14 server (latest version compatible with .NET 9) # Determine platform RID based on Docker TARGETPLATFORM
# Using manifest to get current server build RUN if [ "${TARGETPLATFORM:-linux/amd64}" = "linux/arm64" ]; then \
RUN SERVER_URL=$(curl -sL https://central.spacestation14.io/builds/wizards/manifest.json | \ echo "linux-arm64" > /tmp/platform_rid; \
jq -r '.builds | to_entries | sort_by(.value.time) | last | .value.server."linux-x64".url') && \ else \
echo "linux-x64" > /tmp/platform_rid; \
fi && \
echo "Building for platform: $(cat /tmp/platform_rid)"
# Download and extract SS14 server from WYLAB CDN
RUN PLATFORM_RID=$(cat /tmp/platform_rid) && \
SERVER_URL=$(curl -sL https://cdn.wylab.me/fork/wylab/manifest | \
jq -r ".builds | to_entries | sort_by(.value.time) | last | .value.server.\"${PLATFORM_RID}\".url") && \
echo "Downloading server from: $SERVER_URL" && \ echo "Downloading server from: $SERVER_URL" && \
wget -O SS14.Server_linux-x64.zip "$SERVER_URL" && \ wget -O SS14.Server.zip "$SERVER_URL" && \
unzip SS14.Server_linux-x64.zip -d /ss14-default/ unzip SS14.Server.zip -d /ss14-default/
# Download and build Watchdog # Download and build Watchdog
RUN wget https://github.com/space-wizards/SS14.Watchdog/archive/refs/heads/master.zip -O Watchdog.zip && \ RUN PLATFORM_RID=$(cat /tmp/platform_rid) && \
wget https://github.com/space-wizards/SS14.Watchdog/archive/refs/heads/master.zip -O Watchdog.zip && \
unzip Watchdog.zip -d Watchdog && \ unzip Watchdog.zip -d Watchdog && \
cd Watchdog/SS14* && \ cd Watchdog/SS14.Watchdog-master && \
dotnet publish -c Release -r linux-x64 --no-self-contained && \ dotnet publish SS14.Watchdog -c Release -r "${PLATFORM_RID}" --no-self-contained -o /ss14-default/publish
cp -r SS14.Watchdog/bin/Release/net9.0/linux-x64/publish /ss14-default
# Server stage # Server stage
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS server FROM mcr.microsoft.com/dotnet/sdk:9.0 AS server
@@ -27,7 +43,8 @@ FROM mcr.microsoft.com/dotnet/sdk:9.0 AS server
COPY --from=build /ss14-default /ss14-default COPY --from=build /ss14-default /ss14-default
# Install necessary tools # Install necessary tools
RUN apt-get -y update && apt-get -y install unzip RUN apt-get -y update && apt-get -y install unzip && \
rm -rf /var/lib/apt/lists/*
# Expose necessary ports # Expose necessary ports
EXPOSE 1212/tcp EXPOSE 1212/tcp
@@ -38,8 +55,8 @@ EXPOSE 8080/tcp
VOLUME [ "/ss14" ] VOLUME [ "/ss14" ]
# Add configurations # Add configurations
ADD appsettings.yml /ss14-default/publish/appsettings.yml COPY appsettings.yml /ss14-default/publish/appsettings.yml
ADD server_config.toml /ss14-default/publish/server_config.toml COPY server_config.toml /ss14-default/publish/server_config.toml
COPY start.sh /start.sh COPY start.sh /start.sh
RUN chmod +x /start.sh RUN chmod +x /start.sh

100
README.md
View File

@@ -13,44 +13,69 @@
### Overview ### Overview
This project is for those who prefer containerized solutions. It's based on the [official documentation](https://docs.spacestation14.com/en/general-development/setup/server-hosting-tutorial.html) but wrapped up in a Docker container for convenience. This project is for those who prefer containerized solutions. It's based on the [official documentation](https://docs.spacestation14.com/en/general-development/setup/server-hosting-tutorial.html) but wraps the [wylab-station-14](https://git.wylab.me/wylab/wylab-station-14) fork in a Docker image that is built from source during the Docker build.
### Quick Start ### Building the Image
1. **Clone the repository** 1. **Clone this repository**
```bash ```bash
git clone https://github.com/LiamAEdwards/SS14-Docker-Linux-Server.git && cd SS14-Docker-Linux-Server git clone https://git.wylab.me/wylab/WS14-Docker-Linux-Server.git
cd WS14-Docker-Linux-Server
``` ```
2. **Configure Your Server** 2. **Configure your server defaults**
Edit the `appsettings.yml` & `server_config.toml` to match your desired configuration. Edit `appsettings.yml` and `server_config.toml` with the values you want baked into the image. These files will be copied into `/ss14-default/publish` on first run.
3. **Run the Server** 3. **Build the Docker image**
Using Docker directly:
```bash ```bash
docker run -d \ docker build \
--build-arg SOURCE_REPO=https://git.wylab.me/wylab/wylab-station-14.git \
--build-arg SOURCE_REF=master \
--build-arg TARGET_PLATFORM=auto \
-t git.wylab.me/wylab/WS14-Docker-Linux-Server:local .
```
- `SOURCE_REPO` Git URL of the content repo to compile (defaults to the wylab fork).
- `SOURCE_REF` Branch, tag, or commit to check out (defaults to `master`).
- `TARGET_PLATFORM` Runtime identifier passed to the packaging tool. Use `auto` (default) to match the Docker target platform automatically, or override with `linux-x64`, `linux-arm64`, or `linux-arm` to force an architecture.
If you are building on one architecture and running on another (for example, building on x86 and deploying to an ARM board), build with an explicit platform to avoid `exec format error`:
```bash
docker buildx build \
--platform linux/arm64 \
--build-arg TARGET_PLATFORM=linux-arm64 \
-t git.wylab.me/wylab/WS14-Docker-Linux-Server:arm64 .
```
The build container clones the selected ref, runs `RUN_THIS.py --quiet` to fetch submodules, and executes `dotnet run --project Content.Packaging server` to generate a release zip that is baked into the final layer.
### Running the Server
```bash
docker run -d \
-p 1212:1212/tcp \ -p 1212:1212/tcp \
-p 1212:1212/udp \ -p 1212:1212/udp \
-p 5000:5000/tcp \ -p 5000:5000/tcp \
-p 5000:5000/udp \ -p 5000:5000/udp \
-v /path/on/host:/ss14 \ -v /path/on/host:/ss14 \
ghcr.io/liamaedwards/ss14-docker-linux-server:main --name wylab-ss14 \
``` git.wylab.me/wylab/WS14-Docker-Linux-Server:latest
```
Or using Docker Compose: On first start the container copies `/ss14-default` into your mounted volume (if empty) so you can edit configs or upload new builds persistently.
First, create a `docker-compose.yml` file: You can still wrap the container in Docker Compose if desired:
```yaml ```yaml
version: '3' version: '3.9'
services: services:
ss14-server: ss14-server:
image: ghcr.io/liamaedwards/ss14-docker-linux-server:main image: git.wylab.me/wylab/WS14-Docker-Linux-Server:latest
ports: ports:
- "1212:1212/tcp" - "1212:1212/tcp"
- "1212:1212/udp" - "1212:1212/udp"
@@ -58,13 +83,40 @@ This project is for those who prefer containerized solutions. It's based on the
- "5000:5000/udp" - "5000:5000/udp"
volumes: volumes:
- /path/on/host:/ss14 - /path/on/host:/ss14
restart: always restart: unless-stopped
``` ```
Then, run with: ### CI/CD
```bash Two workflows keep this image up to date:
docker-compose up -d
``` 1. **`wylab-station-14/.github/workflows/publish.yml`**
- Triggered on pushes to `master`, manual dispatch, or nightly cron.
- Checks `https://cdn.wylab.me/fork/wylab/manifest` first; if the current commit already exists on the CDN it exits early.
- Uses `actions/cache` to persist `~/.nuget/packages` and `RobustToolbox/bin`, so repeated builds reuse restored packages/engine binaries when the inputs havent changed.
- Otherwise builds the server/client packages via `Content.Packaging`, uploads them via `Tools/publish_multi_request.py`, and fires a `repository_dispatch` event (`event_type: ss14-package-ready`) to this repo.
Required secrets in the wylab-station-14 repo:
`PUBLISH_TOKEN`, `DOCKER_TRIGGER_TOKEN`, and (if used) `SECRETS_PRIVATE_KEY`.
To send the dispatch, add `DOCKER_TRIGGER_TOKEN` (a PAT with repo access).
2. **`WS14-Docker-Linux-Server/.github/workflows/main.yml`**
- Triggered on pushes here, manual dispatch, or the `ss14-package-ready` event.
- Resolves the target wylab commit (uses the payload commit if provided).
- Logs into `git.wylab.me` and runs `docker manifest inspect` before building; if an image tagged with that commit already exists it skips the build.
- Otherwise builds the Docker image with `SOURCE_REF=<commit>` and pushes:
- `git.wylab.me/wylab/ws14-docker-linux-server:latest`
- `git.wylab.me/wylab/ws14-docker-linux-server:<docker repo commit>`
- `git.wylab.me/wylab/ws14-docker-linux-server:<wylab commit>`
Required secrets here: `REGISTRY_USERNAME` / `REGISTRY_PASSWORD` (credentials for `git.wylab.me`).
After the build finishes, Unraid (or any host) can pull:
```
git.wylab.me/wylab/ws14-docker-linux-server:latest
```
Use that string in Unraids “Repository” field and map `/ss14` to persistent storage.
--- ---

View File

@@ -25,35 +25,25 @@ Serilog:
AllowedHosts: "*" AllowedHosts: "*"
# Force Kestrel to bind to 0.0.0.0 (IPv4) instead of [::] (IPv6) # Force Kestrel to bind to 0.0.0.0 (IPv4) instead of [::] (IPv6)
# This fixes the Host header issue with http://[::]:8080
Urls: "http://0.0.0.0:8080" Urls: "http://0.0.0.0:8080"
# API URL your watchdog is accessible from. # API URL your watchdog is accessible from.
# This NEEDS to be reachable by the game server. # This NEEDS to be reachable by the game server.
# If you don't want the watchdog to be public,
# do `http://localhost:8080/` here.
#BaseUrl: https://your.domain.com/watchdog/
BaseUrl: http://localhost:8080/ BaseUrl: http://localhost:8080/
Servers: Servers:
Instances: Instances:
# ID (and directory) of your server. wylab:
test: Name: "WyLab Station 14"
# Name of the server
Name: "Test Instance"
# Token to control the instance remotely
ApiToken: "foobar" ApiToken: "foobar"
# Port OF THE GAME SERVER.
# This should match the HTTP status API
# or watchdog can't contact the server.
ApiPort: 1212 ApiPort: 1212
TimeoutSeconds: 120
# Override the baseUrl to use localhost instead of [::] # Override the baseUrl to use localhost
EnvironmentVariables: EnvironmentVariables:
ROBUST_CVAR_watchdog__baseUrl: "http://localhost:8080/" ROBUST_CVAR_watchdog__baseUrl: "http://localhost:8080/"
# Auto update configuration. This can be # Auto update from WyLab CDN
# omitted to skip auto updates.
UpdateType: "Manifest" UpdateType: "Manifest"
Updates: Updates:
ManifestUrl: "https://central.spacestation14.io/builds/wizards/manifest.json" ManifestUrl: "https://cdn.wylab.me/fork/wylab/manifest"

View File

@@ -34,13 +34,24 @@ bind = "*:1212"
[watchdog] [watchdog]
# Token must match ApiToken in appsettings.yml # Token must match ApiToken in appsettings.yml
token = "foobar" token = "foobar"
# Key must match the instance key in appsettings.yml (e.g., "test") # Key must match the instance key in appsettings.yml
key = "test" key = "wylab"
# BaseUrl must match BaseUrl in appsettings.yml # BaseUrl must match BaseUrl in appsettings.yml
baseUrl = "http://localhost:8080/" baseUrl = "http://localhost:8080/"
[game] [game]
hostname = "MyServer" hostname = "MyServer"
lobbyenabled = true
# Lobby wait in seconds before round start (default 150s)
lobbyduration = 180
defaultpreset = "secret"
fallbackpreset = "Traitor,Extended"
fallbackenabled = true
# Use built-in rotation list; edit this when you add custom pools.
map_pool = "DefaultMapPool"
map_rotation = true
# How many past rounds are remembered when picking the next map.
map_memory_depth = 8
[console] [console]
# If this is true, people connecting from this machine (loopback) # If this is true, people connecting from this machine (loopback)
@@ -63,37 +74,18 @@ server_url = ""
hub_urls = "https://central.spacestation14.io/hub/" hub_urls = "https://central.spacestation14.io/hub/"
[build] [build]
# *Absolutely all of these can be supplied using a "build.json" file* # Watchdog automatically provides build info from CDN manifest
# For further information, see https://github.com/space-wizards/space-station-14/blob/master/Tools/gen_build_info.py # These are only used as fallback if watchdog doesn't provide them
# The main reason you'd want to supply any of these manually is for a custom fork and if you have no tools.
# Useful to override if the existing version is bad. [database]
# See https://github.com/space-wizards/RobustToolbox/tags for version values, remove the 'v'. # Database engine: sqlite or postgres
# The value listed here is almost certainly wrong - it is ONLY a demonstration of format. engine = "postgres"
# engine_version = "0.7.6" # PostgreSQL connection settings
pg_host = "192.168.1.50"
# This one is optional, the launcher will delete other ZIPs of the same fork to save space. pg_port = 5432
# fork_id = "abacusstation" pg_database = "ss14"
pg_username = "ss14"
# Automatically set if self-hosting client zip, but otherwise use this when updating client build. pg_password = "hyphar-cAqtu6-wyzfet"
# There is no required format, any change counts as a new version.
# version = "Example1"
# This is where the launcher will download the client ZIP from.
# If this isn't supplied, the server will check for a file called "Content.Client.zip",
# and will host it on the status server.
# If that isn't available, the server will attempt to find and use "../../Resources" and
# "../../bin/Content.Client" to automatically construct a client zip.
# It will then host this on the status server.
# Note that these paths do not work on "FULL_RELEASE" servers.
# FULL_RELEASE servers expect to be used with a specific "packaged" layout.
# As such, whatever script you're using to package them is expected to create the ZIP.
# download_url = "http://example.com/compass.zip"
# Build hash - this is a *capitalized* SHA256 hash of the client ZIP.
# Optional in any case and automatically set if hosting a client ZIP.
# This hash is an example only.
# build = "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"
[auth] [auth]
# Authentication (accounts): # Authentication (accounts):

View File

@@ -1,12 +1,10 @@
#!/bin/bash #!/bin/bash
# Check if directory is empty # Copy default files to volume on first run
if [ ! "$(ls -A /ss14)" ]; then if [ ! "$(ls -A /ss14)" ]; then
# Copy the default files cp -r /ss14-default/* /ss14/
cp -R /ss14-default/* /ss14/
fi fi
# Start the original command # Run watchdog
cd /ss14/publish/ cd /ss14/publish/
./SS14.Watchdog "$@" exec ./SS14.Watchdog "$@"