initial commit
This commit is contained in:
commit
029ded7377
9
.drone.yml
Normal file
9
.drone.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: docker.kapelle.org/l4d2
|
||||||
|
registry: docker.kapelle.org
|
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!Dockerfile
|
||||||
|
!docker-compose.yml
|
||||||
|
!start.sh
|
||||||
|
!README.md
|
||||||
|
!.drone.yml
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM cm2network/steamcmd:latest
|
||||||
|
|
||||||
|
COPY start.sh /home/steam/start.sh
|
||||||
|
|
||||||
|
WORKDIR /home/steam/
|
||||||
|
|
||||||
|
ENTRYPOINT /home/steam/start.sh
|
13
README.md
Normal file
13
README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Left 4 dead 2 server.
|
||||||
|
|
||||||
|
# Ports
|
||||||
|
- 27015
|
||||||
|
- 27015/udp
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
|
||||||
|
The `server.cfg` gets created on the fly and gets filled with the enviroment variable starting with `CVAR_`.
|
||||||
|
So for example to set the RCON password set the enviroment variable `CVAR_RCON_PASSWORD=password123`.
|
||||||
|
Try to avoid variables with the word `CVAR_` and avoid `=` in it.
|
||||||
|
|
||||||
|
A list of available cvars can be found [here](https://developer.valvesoftware.com/wiki/List_of_L4D2_Cvars).
|
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
l4d2:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
- CVAR_HOSTNAME=My left 4 dead server
|
||||||
|
- CVAR_RCON_PASSWORD=password123
|
||||||
|
- CVAR_MP_DISABLE_AUTOKICK=1
|
17
start.sh
Executable file
17
start.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "### Installing / Updateing l4d2 ###"
|
||||||
|
|
||||||
|
/home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir $HOME/server +app_update 222860 validate +quit
|
||||||
|
|
||||||
|
echo "### Creating config ###"
|
||||||
|
|
||||||
|
cd $HOME/server
|
||||||
|
|
||||||
|
env | awk -F "=" '/^CVAR_/ {sub("CVAR_","",$1); print tolower($1),($2 ~ /^[0-9]+$/)?$2:"\""$2"\""}' > docker_server.cfg
|
||||||
|
|
||||||
|
echo "### Starting l4d2 ###"
|
||||||
|
|
||||||
|
$HOME/server/srcds_run -console -game left4dead2 +maxplayers 16 -maxclients 16 +map c1m1_hotel +exec docker_server.cfg
|
Loading…
Reference in New Issue
Block a user