GithubHelp home page GithubHelp logo

shigbeard / tf2-servers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from melkortf/tf2-servers

0.0 0.0 0.0 199 KB

TF2 server in Docker container - multiple images for various purposes

Home Page: https://hub.docker.com/r/melkortf/tf2-base

License: MIT License

Shell 10.59% Dockerfile 89.41%

tf2-servers's Introduction

tf2-servers logo by bobair

tf2-servers

Docker Image Version Docker Image Size Docker Pulls MIT license

Team Fortress 2 Dedicated Server Docker images for multiple purposes

$ docker run \
  -v "maps:/home/tf2/server/tf/maps" \
  -e "RCON_PASSWORD=foobar123" \
  -e "SERVER_HOSTNAME=melkor.tf" \
  -e "STV_NAME=melkor TV" \
  --network=host \
  melkortf/tf2-base

Concerning server.cfg

Each TF2 image has its own server.cfg.template file that is used to generate server.cfg. The docker container uses envsubst to replace environment variables in the template file. For example, this line in server.cfg.template:

rcon_password "${RCON_PASSWORD}"

when launched with these params:

$ docker run --network=host -e RCON_PASSWORD=123456 -itd melkortf/tf2-base

will generate the following server.cfg:

rcon_password "123456"

There are many more configuration options, you will find them all below.

tf2-base

$ docker pull melkortf/tf2-base

The base image for all other images; pure TF2 server, without any add-ons and plugins.

Environment variable Default value Used in Description
IP 0.0.0.0 -ip ${IP} Specifies the address to use for the bind(2) syscall.
PORT 27015 -port ${PORT} The port which the server will run on.
CLIENT_PORT 27016 +clientport ${CLIENT_PORT} The client port.
STEAM_PORT 27018 -steamport ${STEAM_PORT} Master server updater port.
STV_PORT 27020 +tv_port ${STV_PORT} SourceTV port.
RCON_PASSWORD 123456 rcon_password "${RCON_PASSWORD}" The RCON passowrd (change this in your docker run invocation).
SERVER_HOSTNAME A Team Fortress 2 server hostname "${SERVER_HOSTNAME}" The game server hostname.
SERVER_PASSWORD sv_password "${SERVER_PASSWORD}" The server password.
STV_NAME Source TV tv_name "${STV_NAME}" SourceTV host name.
STV_TITLE A Team Fortress 2 server Source TV tv_title "${STV_TITLE}" Title for the SourceTV spectator UI.
STV_PASSWORD tv_password "${STV_PASSWORD}" SourceTV password.
DOWNLOAD_URL https://dl.serveme.tf/ sv_downloadurl "${DOWNLOAD_URL}" Download URL for the FastDL.

tf2-sourcemod

$ docker pull melkortf/tf2-sourcemod

TF2 server with Metamod:Source and SourceMod installed.

tf2-competitive

$ docker pull melkortf/tf2-competitive

TF2 server configured to be used in competitive matches. The following plugins, add-ons and configs are installed:

Environment variable Default value Used in Description
DEMOS_TF_APIKEY sm_demostf_apikey ${DEMOS_TF_APIKEY} The API key used to upload the demo to demos.tf.
LOGS_TF_APIKEY logstf_apikey ${LOGS_TF_APIKEY} The API key used to upload logs to logs.tf.

tf2-dm

$ docker pull melkortf/tf2-dm

TF2 dedicated server for DeathMatch gameplay.

tf2-mge

$ docker pull melkortf/tf2-mge

TF2 dedicated server for MGE 1v1 training mod.

Maps

In order to make the image as small as possible, the only map shipped with the image is cp_badlands. This has also the advantage of letting you maintain only one directory with all the maps and share it between all the containers. Just mount /home/tf2/server/tf/maps to your local directory that contains all the maps you need:

$ docker run -v "/usr/local/data/tf2/maps:/home/tf2/server/tf/maps" --network=host -d melkortf/tf2-base

If you want to have all the maps available on serveme.tf's FastDL, just type the following command:

$ wget -r --no-parent --accept bsp -l1 --cut-dirs=2 --no-host-directories -nc https://dl.serveme.tf/maps/

It will download every single map to the current directory.

tf2-servers's People

Contributors

dependabot[bot] avatar garrappachc avatar llamasking avatar shigbeard avatar spaenny avatar suprovsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.