Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build

WORKDIR /build
ADD . .

RUN dotnet publish -c Release -r linux-x64 --no-self-contained

FROM mcr.microsoft.com/dotnet/sdk:8.0

# These are apparently required dependencies.
RUN apt update -y && \
apt install -y git python3 python-is-python3

COPY --from=build /build/SS14.Watchdog/bin/Release/net8.0/linux-x64/publish /watchdog

WORKDIR /watchdog

# Both TCP and UDP traffic must be explicitly exposed on port 1212
EXPOSE 1212/tcp
EXPOSE 1212/udp
EXPOSE 8080/tcp

VOLUME ["/watchdog/instances"]

ENV DOTNET_ENVIRONMENT Production

ENTRYPOINT ["./SS14.Watchdog"]
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# SS14.Watchdog
# SS14.Watchdog

SS14.Watchdog is SS14's server-hosting wrapper thing, similar to [TGS](https://github.com/tgstation/tgstation-server) for BYOND (but much simpler for the time being). It handles auto updates, monitoring, automatic restarts, and administration. We recommend you use this for proper deployments.

Documentation on how setup and use for SS14.Watchdog is [here](https://docs.spacestation14.io/en/getting-started/hosting#watchdog).

## Docker
To build and run Watchdog in a Docker container:

```sh
docker build -t ss14-watchdog .
docker run \
-p 1212:1212/tcp \
-p 1212:1212/udp \
-p 8080:8080/tcp \
-v /path/to/instances/:/watchdog/instances/ \
-v /path/to/appsettings.yml:/watchdog/appsettings.yml \
ss14-watchdog
```

To deploy with docker compose, edit `docker-compose.yml` to your liking, supplying your own appsettings.yml if needed, then run:

```sh
docker compose build
docker compose up -d
```
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
ss14-watchdog:
build: .
image: ss14-watchdog
restart: always
ports:
- 8080:8080/tcp
- 1212:1212/tcp
- 1212:1212/udp
volumes:
- instances:/watchdog/instances/
# # Uncomment to supply your own appsettings.yml
# - type: bind
# source: /tmp/appsettings.yml
# target: /watchdog/appsettings.yml

volumes:
instances: