-
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
51 changed files
with
1,182 additions
and
273 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
# Development | ||
/.vagrant/ | ||
|
||
# Project | ||
/build/docker-compose.yml |
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,41 @@ | ||
# Contribution Guide | ||
> Thank you for considering contributing to the project. | ||
## Features and Bugs | ||
|
||
Should you experience any bugs or have a feature wish, you can | ||
let us know by [creating a new issue][issues-create] on GitHub. | ||
|
||
Before creating a new issue search for existing issues. | ||
Maybe it has already been reported by someone else. | ||
|
||
## Pull Requests | ||
|
||
We'd like to encourage you to contribute code and we do appreciate all help | ||
on making this a better project. Especially look out for issues tagged with | ||
[`contribution`][issues-contribute], which are free to grab and work on. | ||
Give as a shout if you consider working on one. | ||
|
||
To stay on track we ask you to respect the following **contribution rules**: | ||
|
||
- Fork the repository when working on a feature or bugfix. | ||
- Create PRs based on the `develop` branch. | ||
- Use an `editorconfig` compliant editor and/or respect the [settings][file-editorconfig]. | ||
- Update the [`CHANGELOG`][file-changelog] and [`README`][file-readme] files if relevant. | ||
|
||
## Contact | ||
|
||
Feel free to contact us if you have questions or feedback. | ||
|
||
- Join our [Slack Channel][contact-slack]. | ||
- Join our [Steam Group][contact-steam]. | ||
- Join our discussion on the [Klei Forums][contact-forums]. | ||
|
||
[issues-create]: https://github.com/dst-academy/server/issues/new/ | ||
[issues-contribute]: https://github.com/dst-academy/server/labels/contribution | ||
[file-editorconfig]: https://github.com/dst-academy/server/blob/develop/.editorconfig | ||
[file-readme]: https://github.com/dst-academy/server/blob/develop/README.md | ||
[file-changelog]: https://github.com/dst-academy/server/blob/develop/CHANGELOG.md | ||
[contact-slack]: http://slack.dst.academy/ | ||
[contact-steam]: https://steamcommunity.com/groups/dst-academy | ||
[contact-forums]: http://forums.kleientertainment.com/topic/61674-custom-dedicated-server-with-docker/ |
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 |
---|---|---|
|
@@ -4,70 +4,97 @@ MAINTAINER Thomas Deinhamer <[email protected]> | |
# Install dependencies. | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends ca-certificates curl lib32gcc1 lib32stdc++6 libcurl4-gnutls-dev:i386 \ | ||
&& 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/* \ | ||
&& gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ | ||
&& curl -o /usr/local/bin/gosu -fSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture)" \ | ||
&& curl -o /usr/local/bin/gosu.asc -fSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture).asc" \ | ||
&& 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_HOME="/opt/steam" \ | ||
DST_HOME="/opt/dst" \ | ||
DSTA_HOME="/usr/local/lib/dsta" \ | ||
CONFIG_PATH="/var/lib/dsta/config" | ||
|
||
# Add steam user. | ||
RUN adduser --home /var/lib/steam --disabled-login --gecos "Steam" steam | ||
RUN adduser --disabled-login --gecos "Steam" --home $STEAM_HOME steam | ||
|
||
# Install SteamCMD. | ||
RUN gosu steam mkdir -p /var/lib/steam/steamcmd/ \ | ||
&& curl -SL "http://media.steampowered.com/installer/steamcmd_linux.tar.gz" | gosu steam tar -xzvC /var/lib/steam/steamcmd \ | ||
&& chmod 744 /var/lib/steam/steamcmd/steamcmd.sh \ | ||
&& gosu steam /var/lib/steam/steamcmd/steamcmd.sh \ | ||
RUN curl -fsSL "https://cdn.steamstatic.com/client/installer/steamcmd_linux.tar.gz" | gosu steam tar -xzvC $STEAM_HOME \ | ||
&& gosu steam $STEAM_HOME/steamcmd.sh \ | ||
+@ShutdownOnFailedCommand 1 \ | ||
+quit | ||
+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 | ||
|
||
# Install Don't Starve Together Server. | ||
COPY /update_dst.sh /var/lib/steam/ | ||
RUN chown steam:steam /var/lib/steam/update_dst.sh \ | ||
RUN mkdir -p $DST_HOME \ | ||
&& chown steam:steam $DST_HOME \ | ||
&& sync \ | ||
&& /var/lib/steam/update_dst.sh | ||
&& gosu steam $STEAM_HOME/steamcmd.sh \ | ||
+@ShutdownOnFailedCommand 1 \ | ||
+login anonymous \ | ||
+force_install_dir $DST_HOME \ | ||
+app_update 343050 validate \ | ||
+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 | ||
|
||
# Copy common scripts. | ||
COPY /script/* /usr/local/bin/ | ||
|
||
# Add dsta user. | ||
RUN adduser --home /var/lib/dsta --disabled-login --gecos "DST Academy" dsta | ||
# Copy entrypoint script. | ||
COPY /docker-entrypoint.sh /entrypoint.sh | ||
|
||
# Copy static files. | ||
COPY /static $DSTA_HOME | ||
RUN mkfifo $DSTA_HOME/console \ | ||
&& chown -R steam:steam $DSTA_HOME \ | ||
&& mkdir -p `dirname $CONFIG_PATH` \ | ||
&& chown steam:steam `dirname $CONFIG_PATH` | ||
|
||
# Set environment variables. | ||
ENV UPDATE_ON_BOOT=true \ | ||
DEFAULT_SERVER_NAME= \ | ||
DEFAULT_SERVER_DESCRIPTION="Powered by DST Academy." \ | ||
ENV SERVER_DESCRIPTION="Powered by DST Academy." \ | ||
SERVER_PORT=10999 \ | ||
OFFLINE_SERVER=false \ | ||
OFFLINE_ENABLE=false \ | ||
MAX_PLAYERS=4 \ | ||
WHITELIST_SLOTS=0 \ | ||
PVP=false \ | ||
PVP_ENABLE=false \ | ||
GAME_MODE=survival \ | ||
SERVER_INTENTION=cooperative \ | ||
ENABLE_AUTOSAVER=true \ | ||
AUTOSAVER_ENABLE=true \ | ||
TICK_RATE=15 \ | ||
CONNECTION_TIMEOUT=5000 \ | ||
ENABLE_VOTE_KICK=true \ | ||
VOTE_KICK_ENABLE=true \ | ||
PAUSE_WHEN_EMPTY=true \ | ||
STEAM_AUTHENTICATION_PORT=8766 \ | ||
STEAM_MASTER_SERVER_PORT=27016 \ | ||
STEAM_GROUP_ONLY=false \ | ||
STEAM_GROUP_ADMINS=false \ | ||
CONSOLE_ENABLED=true \ | ||
AUTOCOMPILER_ENABLED=true \ | ||
MODS_ENABLED=true \ | ||
CONSOLE_ENABLE=true \ | ||
AUTOCOMPILER_ENABLE=false \ | ||
MODS_ENABLE=true \ | ||
SHARD_ENABLE=false \ | ||
IS_MASTER=false \ | ||
BIND_IP="0.0.0.0" \ | ||
DISABLECLOUD=true | ||
|
||
# Add entrypoint script. | ||
COPY /entrypoint.sh /adjectives.txt /names.txt /var/lib/dsta/ | ||
RUN chown dsta:dsta -R /var/lib/dsta/ | ||
SHARD_IS_MASTER=false \ | ||
SHARD_BIND_IP="0.0.0.0" \ | ||
STEAM_CLOUD_DISABLE=true | ||
|
||
# Expose default server port. | ||
EXPOSE 10999/udp | ||
VOLUME ["/var/lib/dsta/server"] | ||
|
||
WORKDIR /var/lib/steam/DoNotStarveTogether/bin/ | ||
ENTRYPOINT ["/var/lib/dsta/entrypoint.sh"] | ||
# Set up a volume for configuration files. | ||
VOLUME ["$CONFIG_PATH"] | ||
|
||
# Set entrypoint and default command. | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["dst-server", "start"] |
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ $1 == "dst-server" ]; then | ||
set -e | ||
|
||
# Configure the server | ||
chown steam:steam $CONFIG_PATH | ||
|
||
$DSTA_HOME/boot/settings.sh | ||
$DSTA_HOME/boot/lists.sh | ||
$DSTA_HOME/boot/world.sh | ||
$DSTA_HOME/boot/mods.sh | ||
fi | ||
|
||
exec "$@" |
Oops, something went wrong.