From d0810150ed75cd5f6612028f9583267702eae7e4 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 9 Oct 2022 15:24:47 +0200 Subject: [PATCH] first commit --- .drone.yml | 21 +++++++++++++++++++++ Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ README.md | 3 +++ motd.txt | 4 ++++ server.cfg.template | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 motd.txt create mode 100644 server.cfg.template diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..25b5f56 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,21 @@ +--- +kind: pipeline +type: docker +name: build-docker + +platform: + os: linux + arch: amd64 + +steps: + - name: tf2-casual + image: plugins/docker + settings: + repo: spaenny/casual-server + cache_from: "spaenny/casual-server:latest" + context: ./ + dockerfile: ./Dockerfile + username: + from_secret: docker_username + password: + from_secret: docker_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dddb3a1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM melkortf/tf2-sourcemod:latest +LABEL maintainer="philipp@boehm.sh" + +RUN \ + # download plugins + wget -nv "https://github.com/dordnung/System2/releases/download/v3.3.2/system2.zip" -O system2.zip \ + && wget -nv "https://github.com/sapphonie/StAC-tf2/releases/download/v5.4.2/stac.zip" -O stac.zip \ + && wget -nv "https://github.com/sapphonie/sourcemod-nativevotes-updated/releases/download/workflow-build19/nativevotes.zip" -O nativevotes.zip \ + && wget -nv "http://users.alliedmods.net/~kyles/builds/SteamWorks/SteamWorks-git132-linux.tar.gz" -O SteamWorks.tar.gz \ + && wget -nv "https://gitlab.com/Zipcore/Discord/-/raw/master/plugins/discord.smx" -O discord.smx \ + && wget -nv "https://gitlab.com/Zipcore/Discord/-/raw/master/plugins/discord_sourcebans.smx" -O discord_sourcebans.smx \ + && wget -nv "https://gitlab.com/Zipcore/Discord/-/raw/master/plugins/discord_sourcecomms.smx" -O discord_sourcecomms.smx \ + && wget -nv "https://forums.alliedmods.net/attachment.php?attachmentid=83286&d=1299423920" -O socket.zip \ + && wget -nv "https://github.com/ldesgoui/tf2-comp-fixes/releases/download/v1.16.10/tf2-comp-fixes.zip" -O tf2-comp-fixes.zip \ + && wget -nv "https://github.com/sbpp/sourcebans-pp/releases/download/1.6.4/sourcebans-pp-1.6.4.plugin-only.zip" -O sourcebans.zip \ + + # install plugins + && unzip -o system2.zip -d "${SERVER_DIR}/tf/addons/sourcemod/" \ + && unzip -o stac.zip -d "${SERVER_DIR}/tf/addons/sourcemod/" \ + && unzip -o nativevotes.zip -d "${SERVER_DIR}/tf/" \ + && tar xf SteamWorks.tar.gz -C "${SERVER_DIR}/tf/" \ + && mv discord.smx "${SERVER_DIR}/tf/addons/sourcemod/plugins/discord.smx" \ + && mv discord_sourcebans.smx "${SERVER_DIR}/tf/addons/sourcemod/plugins/discord_sourcebans.smx" \ + && mv discord_sourcecomms.smx "${SERVER_DIR}/tf/addons/sourcemod/plugins/discord_sourcecomms.smx" \ + && unzip -o socket.zip -d "${SERVER_DIR}/tf/" \ + && unzip -o tf2-comp-fixes.zip -d "${SERVER_DIR}/tf/" \ + && unzip -o sourcebans.zip -d "${SERVER_DIR}/tf/" \ + + # cleanup + && rm system2.zip stac.zip nativevotes.zip SteamWorks.tar.gz socket.zip tf2-comp-fixes.zip sourcebans.zip \ + && rm "${SERVER_DIR}/tf/addons/sourcemod/plugins/admin-flatfile.smx" + +COPY server.cfg.template "${SERVER_DIR}/tf/cfg/server.cfg.template" +COPY motd.txt "${SERVER_DIR}/tf/cfg/motd.txt" + +CMD ["+sv_pure", "2", "+map", "pl_upward", "+maxplayers", "24"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..0d01fa2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# tf2-Casual + +Team Fortress 2 Server Container Image for a Casual Server diff --git a/motd.txt b/motd.txt new file mode 100644 index 0000000..db9c6be --- /dev/null +++ b/motd.txt @@ -0,0 +1,4 @@ +Welcome to Spenny.TF | Casual + +For any suggestions join the discord: https://spenny.tf/discord +If you have been banned before, and want to check the reason why checkout: https://spenny.tf/sourcebans diff --git a/server.cfg.template b/server.cfg.template new file mode 100644 index 0000000..460dd5c --- /dev/null +++ b/server.cfg.template @@ -0,0 +1,37 @@ +log on + +rcon_password "${RCON_PASSWORD}" + +hostname "${SERVER_HOSTNAME}" +sv_password "${SERVER_PASSWORD}" + +sv_contact "tf2@spenny.tf" +sv_tags "nocrits,nodmgspread,casual,spenny,spenny.tf,public" + +sv_downloadurl "${DOWNLOAD_URL}" +sv_allowdownload 1 +sv_allowupload 1 + +tv_enable 0 + +sv_quota_stringcmdspersecond 400 + +tf_weapon_criticals 0 +tf_weapon_criticals_melee 0 +tf_use_fixed_weaponspreads 1 + +sm_deterministic_fall_damage 1 +sm_fix_ghost_crossbow_bolts 1 +sm_fix_slope_bug 1 +sm_fix_sticky_delay 1 +sm_gunboats_always_apply 1 +sm_projectiles_ignore_teammates 1 +sm_remove_halloween_souls 1 +sm_remove_medic_attach_speed 0 +sm_remove_pipe_spin 0 +sm_rest_in_peace_rick_may 0 +sm_winger_jump_bonus_when_fully_deployed 1 + +sm_concede_command 0 + +