-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
231 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Maintainers | ||
> List of project maintainers. | ||
## Core Maintainers | ||
|
||
- [Thomas Deinhamer](https://github.com/thasmo) / [@thomasdeinhamer](https://twitter.com/thomasdeinhamer) | ||
- [Brais Gabín](https://github.com/BraisGabin) / [@braisgabin](https://twitter.com/braisgabin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,22 @@ | ||
FROM debian:jessie | ||
MAINTAINER Thomas Deinhamer <[email protected]> | ||
FROM dstacademy/steamcmd:0.1 | ||
MAINTAINER DST Academy <[email protected]> | ||
|
||
# Install dependencies. | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update -y \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
lib32gcc1 \ | ||
lib32stdc++6 \ | ||
libcurl4-gnutls-dev:i386 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install gosu. | ||
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ | ||
&& curl -o /usr/local/bin/gosu -fsSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture)" \ | ||
&& curl -o /usr/local/bin/gosu.asc -fsSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture).asc" \ | ||
&& gpg --verify /usr/local/bin/gosu.asc \ | ||
&& rm /usr/local/bin/gosu.asc \ | ||
&& chmod +x /usr/local/bin/gosu | ||
|
||
ENV STEAM_USER="steam" \ | ||
STEAM_HOME="/opt/steam" \ | ||
DST_HOME="/opt/dst" \ | ||
DSTA_HOME="/usr/local/share/dsta" \ | ||
CLUSTER_PATH="/var/lib/dsta/cluster" | ||
|
||
# Add steam user. | ||
RUN adduser --disabled-login --gecos "Steam" --home $STEAM_HOME $STEAM_USER | ||
|
||
# Install SteamCMD. | ||
RUN curl -fsSL "https://cdn.steamstatic.com/client/installer/steamcmd_linux.tar.gz" | gosu $STEAM_USER tar -xzvC $STEAM_HOME \ | ||
&& gosu $STEAM_USER $STEAM_HOME/steamcmd.sh \ | ||
+@ShutdownOnFailedCommand 1 \ | ||
+quit \ | ||
&& rm -rf $STEAM_HOME/Steam/logs $STEAM_HOME/Steam/appcache/httpcache \ | ||
&& find $STEAM_HOME/package -type f ! -name "steam_cmd_linux.installed" ! -name "steam_cmd_linux.manifest" -delete | ||
# Define build arguments. | ||
ARG DST_HOME | ||
ENV DST_HOME ${DST_HOME:-"/opt/dst"} | ||
ARG DSTA_HOME | ||
ENV DSTA_HOME ${DSTA_HOME:-"/usr/local/share/dsta"} | ||
ARG CLUSTER_PATH | ||
ENV CLUSTER_PATH ${CLUSTER_PATH:-"/var/lib/dsta/cluster"} | ||
|
||
# Install Don't Starve Together Server. | ||
RUN mkdir -p $DST_HOME \ | ||
|
@@ -73,7 +53,8 @@ ENV DESCRIPTION="Powered by DST Academy." \ | |
PAUSE_WHEN_EMPTY=true \ | ||
SHARD_NAME=shard \ | ||
SHARD_IS_MASTER=false \ | ||
SHARD_BIND_IP="0.0.0.0" | ||
SHARD_BIND_IP="0.0.0.0" \ | ||
BACKUP_LOG_COUNT=0 | ||
|
||
# Expose default server port. | ||
EXPOSE $SERVER_PORT/udp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
usage(){ | ||
cat $DSTA_HOME/doc/version.usage | ||
} | ||
|
||
local_version(){ | ||
cat $DST_HOME/steamapps/appmanifest_343050.acf | clean_version | ||
} | ||
|
||
upstream_version(){ | ||
rm -rf $STEAM_HOME/Steam/appcache/* | ||
steamcmd +login anonymous +app_info_update 1 +app_info_print 343050 +quit | clean_version | ||
} | ||
|
||
clean_version(){ | ||
grep -Po -m 1 "\"buildid\"\s*\"(.*)\"" | grep -Po "\d*" | ||
} | ||
|
||
if [ "$1" == "--help" ]; then | ||
usage | ||
exit 0 | ||
elif [ $# -eq 0 ]; then | ||
local_version | ||
exit 0 | ||
elif [ $# -eq 1 ]; then | ||
case $1 in | ||
--local) | ||
local_version | ||
exit 0 | ||
;; | ||
|
||
--upstream) | ||
upstream_version | ||
exit 0 | ||
;; | ||
|
||
--check) | ||
version_local=`local_version` | ||
version_upstream=`upstream_version` | ||
|
||
if [ "$version_local" -eq "$version_upstream" ]; then | ||
echo "Version is up to date."; | ||
exit 0; | ||
else | ||
echo "Version is outdated."; | ||
exit 1; | ||
fi | ||
;; | ||
esac | ||
fi | ||
|
||
usage 1>&2 | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
usage: dst-server version [--local|--upstream|--check] | ||
|
||
Print the currently running version of the DST server. | ||
|
||
--local | ||
Return the local version. | ||
--upstream | ||
Return the currently released upstream version. | ||
--check | ||
Check if the currently running version is up to date. |
Oops, something went wrong.