From bab6992cd1771adfacea74a5c0902f6b3ed44082 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Tue, 17 Jun 2025 23:31:19 -0300 Subject: [PATCH] Add tf2 stack --- tf2/.env.example | 4 ++++ tf2/docker-compose.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tf2/.env.example create mode 100644 tf2/docker-compose.yml diff --git a/tf2/.env.example b/tf2/.env.example new file mode 100644 index 0000000..3cffb17 --- /dev/null +++ b/tf2/.env.example @@ -0,0 +1,4 @@ +SRCDS_TOKEN="changeme" #(value is is required to be listed & reachable, retrieve token here (AppID 440): https://steamcommunity.com/dev/managegameservers) +SRCDS_RCONPW="changeme" #(value can be overwritten by tf/cfg/server.cfg) +SRCDS_PW="changeme" #(value can be overwritten by tf/cfg/server.cfg) +SRCDS_WORKSHOP_AUTHKEY="" #(required to load workshop maps) \ No newline at end of file diff --git a/tf2/docker-compose.yml b/tf2/docker-compose.yml new file mode 100644 index 0000000..9e934d8 --- /dev/null +++ b/tf2/docker-compose.yml @@ -0,0 +1,33 @@ +services: + tf2: + # Allocates a stdin (docker run -i) + stdin_open: true + # Allocates a tty (docker run -t) + tty: true + # Use the host network, RECOMMENDED. + network_mode: bridge + # Binds /srv/tf2-dir to /home/steam/tf-dedicated in the container + volumes: + - /docker/appdata/tf2-comp:/home/steam/tf-dedicated + ports: + - "27015:27015/udp" # Main game port + - "27015:27015/tcp" # Rcon port + - "27020:27020/udp" # SourceTV + - "27005:27005" # Incoming + container_name: tf2-comp + image: cm2network/tf2:sourcemod-x64 + environment: + - SRCDS_PORT=27015 + - SRCDS_TV_PORT=27020 + - SRCDS_IP="0.0.0.0" #(local ip to bind) + - SRCDS_FPSMAX=300 + - SRCDS_TICKRATE=66 + - SRCDS_MAXPLAYERS=14 + - SRCDS_REGION=0 + - SRCDS_STARTMAP="cp_process" + - SRCDS_HOSTNAME="shoebottom.ca comp" #(first launch only) + - SRCDS_CFG="server.cfg" + - SRCDS_MAPCYCLE="mapcycle_default.txt" #(value can be overwritten by tf/cfg/server.cfg) + - SRCDS_SECURED=1 #(0 to start the server as insecured) + +