added based server template

This commit is contained in:
2025-06-20 20:39:15 +04:00
parent e3d1654536
commit 49c0f61ea6
8 changed files with 64 additions and 0 deletions

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
curl \
ca-certificates \
lib32gcc-s1 \
lib32stdc++6 \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /steamcmd /hlds
WORKDIR /steamcmd
RUN curl -sSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xz
RUN ./steamcmd.sh +login anonymous \
+force_install_dir /hlds \
+app_update 90 validate \
+quit
RUN mkdir -p /root/.steam/sdk32 && \
ln -sf /hlds/steamclient.so /root/.steam/sdk32/steamclient.so
COPY start.sh /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
EXPOSE 27015/udp
EXPOSE 27020/udp
SHELL ["/bin/bash", "-c"]

0
addons/.gitkeep Normal file
View File

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
version: "3.9"
services:
csdm_1:
build: ./csserver
container_name: csdm-1
ports:
- "${PORT}:${PORT}/udp"
- "${HLTV_PORT}:${HLTV_PORT}/udp"
restart: unless-stopped
environment:
MAP: "de_dust2"
MAXPLAYERS: "16"
PORT: "27015"
HLTV_PORT: "27020"
RCON_PASSWORD: "bro1337"
SV_LAN: "0"
VAC: "insecure"

0
maps/.gitkeep Normal file
View File

0
models/.gitkeep Normal file
View File

0
server.cfg Normal file
View File

0
sounds/.gitkeep Normal file
View File

12
start.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
cd /hlds
./hlds_run \
-game cstrike \
+maxplayers ${MAXPLAYERS:-16} \
+map ${MAP:-de_dust2} \
+sv_lan 0 \
+rcon_password ${RCON_PASSWORD:-changeme} \
-port ${PORT:-27015} \
-${VAC:-insecure}