Fix broken watchdog errors

This commit is contained in:
LiamAEdwards
2025-12-08 17:41:16 +00:00
parent 7983287722
commit 974d47dab1
4 changed files with 30 additions and 11 deletions

View File

@@ -3,11 +3,15 @@ FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
# Update and install necessary tools
RUN apt-get -y update && \
apt-get -y install curl unzip wget git
apt-get -y install curl unzip wget git jq
# Download and extract SS14 server
ADD https://wizards.cdn.spacestation14.com/fork/wizards/version/c50d610771a5674469aef9c4628b10f08a8c74ae/file/SS14.Server_linux-x64.zip SS14.Server_linux-x64.zip
RUN unzip SS14.Server_linux-x64.zip -d /ss14-default/
# Download and extract SS14 server (latest version compatible with .NET 9)
# Using manifest to get current server build
RUN SERVER_URL=$(curl -sL https://central.spacestation14.io/builds/wizards/manifest.json | \
jq -r '.builds | to_entries | sort_by(.value.time) | last | .value.server."linux-x64".url') && \
echo "Downloading server from: $SERVER_URL" && \
wget -O SS14.Server_linux-x64.zip "$SERVER_URL" && \
unzip SS14.Server_linux-x64.zip -d /ss14-default/
# Download and build Watchdog
RUN wget https://github.com/space-wizards/SS14.Watchdog/archive/refs/heads/master.zip -O Watchdog.zip && \
@@ -28,8 +32,7 @@ RUN apt-get -y update && apt-get -y install unzip
# Expose necessary ports
EXPOSE 1212/tcp
EXPOSE 1212/udp
EXPOSE 5000/tcp
EXPOSE 5000/udp
EXPOSE 8080/tcp
# Set volume
VOLUME [ "/ss14" ]

View File

@@ -24,12 +24,16 @@ Serilog:
AllowedHosts: "*"
# 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"
# API URL your watchdog is accessible from.
# This NEEDS to be reachable by the watchdog.
# This NEEDS to be reachable by the game server.
# If you don't want the watchdog to be public,
# do `http://localhost:5000/` here.
# do `http://localhost:8080/` here.
#BaseUrl: https://your.domain.com/watchdog/
BaseUrl: http://localhost:5000/
BaseUrl: http://localhost:8080/
Servers:
Instances:
@@ -44,6 +48,10 @@ Servers:
# or watchdog can't contact the server.
ApiPort: 1212
# Override the baseUrl to use localhost instead of [::]
EnvironmentVariables:
ROBUST_CVAR_watchdog__baseUrl: "http://localhost:8080/"
# Auto update configuration. This can be
# omitted to skip auto updates.
UpdateType: "Manifest"

View File

@@ -24,13 +24,21 @@ enabled = true
# This is the address and port the status server binds to.
# The port is by default set based on net.port so it will follow what you set there.
# bind = "*:1212"
bind = "*:1212"
# This is the address of the SS14 server as the launcher uses it.
# This is only needed if you're proxying the status HTTP server -
# by default the launcher will assume the address and port match that of the status server.
# connectaddress = "udp://localhost:1212"
[watchdog]
# Token must match ApiToken in appsettings.yml
token = "foobar"
# Key must match the instance key in appsettings.yml (e.g., "test")
key = "test"
# BaseUrl must match BaseUrl in appsettings.yml
baseUrl = "http://localhost:8080/"
[game]
hostname = "MyServer"

View File

@@ -7,6 +7,6 @@ if [ ! "$(ls -A /ss14)" ]; then
fi
# Start the original command
cd ss14/publish/
cd /ss14/publish/
./SS14.Watchdog "$@"