mirror of
				https://github.com/mr-vercetti/docker-blackmesa-coop-server.git
				synced 2025-11-04 09:45:48 +01:00 
			
		
		
		
	Add config variables
This commit is contained in:
		@@ -19,7 +19,9 @@ ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
 | 
			
		||||
ENV SERVER_DIR="/blackmesa-server"
 | 
			
		||||
ENV OUTPUT_DIR="/output"
 | 
			
		||||
# Startup variables
 | 
			
		||||
ENV GAME_PARAMS="+map bm_c0a0a +mp_teamplay 1 +maxplayers 2 -port 27015 -console -debug;"
 | 
			
		||||
ENV GAME_PARAMS="+map bm_c0a0a +maxplayers 10 -port 27015 -console -debug"
 | 
			
		||||
ENV GAME_NAME="Black Mesa Co-Op Server"
 | 
			
		||||
ENV GAME_PASSWORD=""
 | 
			
		||||
 | 
			
		||||
# Set up Enviornment
 | 
			
		||||
RUN useradd --home ${SERVER_DIR} --gid root --system abc && \
 | 
			
		||||
@@ -35,6 +37,7 @@ RUN mkdir -p ${SERVER_DIR}/.steam/sdk32 && \
 | 
			
		||||
# Copy files
 | 
			
		||||
COPY --chown=abc:root --from=builder ${OUTPUT_DIR} ${SERVER_DIR}
 | 
			
		||||
COPY --chown=abc:root --chmod=755 /scripts/start.sh /
 | 
			
		||||
COPY --chown=abc:root /config/server.cfg ${SERVER_DIR}/bms/cfg
 | 
			
		||||
 | 
			
		||||
# Download and extract mods
 | 
			
		||||
WORKDIR ${SERVER_DIR}/bms
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								config/server.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								config/server.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
// provides lag-free noblock, shows teammates as friendly
 | 
			
		||||
// and puts an arrow above their head (srccoop handles team switching)
 | 
			
		||||
mp_teamplay 1
 | 
			
		||||
 | 
			
		||||
//disables map timelimit
 | 
			
		||||
mp_timelimit 0
 | 
			
		||||
 | 
			
		||||
// set 1 if you hate your friends
 | 
			
		||||
mp_friendlyfire 0
 | 
			
		||||
 | 
			
		||||
// makes players spawn with previously picked up equipment (suit, weapons). Global for all players.
 | 
			
		||||
sourcecoop_ft KEEP_EQUIPMENT 1
 | 
			
		||||
 | 
			
		||||
sv_cheats 1
 | 
			
		||||
mp_forcerespawn 1
 | 
			
		||||
@@ -1,3 +1,14 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
server_cfg_file="${SERVER_DIR}/bms/cfg/server.cfg"
 | 
			
		||||
 | 
			
		||||
echo "Starting Black Mesa Co-Op server \"$GAME_NAME\""
 | 
			
		||||
echo "hostname \"${GAME_NAME}\"" >> $server_cfg_file
 | 
			
		||||
 | 
			
		||||
if [[ $GAME_PASSWORD != "" ]]; then
 | 
			
		||||
    echo "Password protection enabled"
 | 
			
		||||
    echo "sv_password \"${GAME_PASSWORD}\"" >> $server_cfg_file
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
cd ${SERVER_DIR}
 | 
			
		||||
${SERVER_DIR}/srcds_run -game bms ${GAME_PARAMS}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user