commit 2b76b3e9f29c452b60270165b41743a14f3d9d9f Author: Menno van Leeuwen Date: Fri Apr 21 10:43:34 2023 +0200 Initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a9a885c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM --platform=linux/amd64 debian:latest + +# Install dependencies +RUN apt-get update && apt-get install -y \ + screen \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Create user +RUN useradd -s /bin/bash -U -m rexuiz + +# Install Rexuiz +RUN su rexuiz -c 'curl https://raw.githubusercontent.com/kasymovga/rexuiz/master/scripts/update.sh --output /home/rexuiz/rexuiz_install.sh' +RUN su rexuiz -c 'bash /home/rexuiz/rexuiz_install.sh /home/rexuiz/Rexuiz/' +RUN su rexuiz -c 'chmod 755 /home/rexuiz/Rexuiz/server/rexuiz-linux-dedicated-x86_64' + +# Expose server port +EXPOSE 26000/tcp +EXPOSE 26000/udp + +# Start server +CMD ["su", "rexuiz", "-c", "/home/rexuiz/Rexuiz/server/rexuiz-linux-dedicated-x86_64"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bb7c498 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +IMAGE_NAME := rexuiz-server + +.PHONY: build + +build: + docker build -t $(IMAGE_NAME) . + +run: + docker compose up \ No newline at end of file diff --git a/config/server.cfg b/config/server.cfg new file mode 100644 index 0000000..b9b0cbd --- /dev/null +++ b/config/server.cfg @@ -0,0 +1,133 @@ +//Example configuration. Copy-paste to server.cfg and edit for your server. + +// ===================== +// Basic server settings +// ===================== + +//Name and MOTD +hostname "Some Awesome Server Name" +motd "Welcome to this server" + +//Network settings +port 26000 +net_http_server 1 //use embedded http server +net_http_server_host "" //put server address here for better compatibility with old clients +//sv_curl_defaulturl "http://server:port/mapdir/" for external http server + +//network timeout +net_messagetimeout 30 + +//max client slots (players + spectators) +maxplayers 32 + +//improved protection from wallhack. this settings can cause high cpu usage on some maps (for example tokam). if you have these maps, set this value to 0 +mod_q3bsp_tracelineofsight_brushes 1 + +//use bots when players not enough +minplayers 2 +minplayers_team_factor 0.5 // each team will have minplayers * minplayers_team_factor minimal amount of players + +//g_waypoints_auto_generate 1 //automatically generate waypoints for bots if map don't have them. EXPERIMENTAL + +//vote settings +sv_vote_change 1 +sv_vote_wait 600 //prevent vote flood +sv_vote_master 0 //enable vote to master +sv_vote_master_password password //master password +sv_vote_master_commands "kick kickban movetoteam_blue movetoteam_red movetoteam_yellow movetoteam_pink" +sv_vote_commands "restart gotomap endmatch kick kickban mute" + +//info messages +sv_infomessages_interval 5 +sv_infomessage1 "message1" +sv_infomessage2 "message2" + +//map change delay +sv_mapchange_delay 3 + +//country flags +sv_ip2country 1 + +////Game hints (maybe annoying) +//sv_hints 2 + +////rcon password for admin +//rcon_password somestrongpassword + +//Map settings +g_maplist "" //Use all available maps +g_maplist_exclude "basement bleach accident" //except these maps +g_maplist_mostrecent_count 0 +g_maplist_votable 9 +g_maplist_votable_nodetail 0 +g_maplist_votable_timeout 20 + +//game profile +g_profile "" //possible values: akimbo, bestakimbo, bestdef, cra, minsta, prophets, explosive_minsta, overkill, mixed_arts, duel, minsta_duel, prophets_duel, defragcpm, 2vs2, 3vs3, 4vs4, 5vs5, 6vs6 +// g_profile "overkill 4vs4" //profiles can be stacked, but this must be done careful + +//game type settings +gametype dm +sv_gametypevote "dm tdm ctf ca ft kh" //Other possible gametypes: coop, surv, catf, ctft, dom, lms, race, cts +//sv_gametypevote "ft:cra tdm:akimbo ctf:minsta ctf:overkill" //game types with profiles +//sv_gametypevote "ft:cra+4vs4 tdm:akimbo+4vs4 ctf:minsta+4vs4 ctf:overkill+4vs4" //game types with stacked profiles + + +//Rank system. Warning: can cause big size of data/data/server.db file. +//sv_rank 1 +//sv_rank_hide 0 +//g_balance_teams_use_rank 1 + +// ========================================= +// Game settings. Profiles can override them +// ========================================= + +//max players count +g_maxplayers 16 + +//runes +g_runes 0 +g_runes_hacker 0 +g_runes_carried_runes_max 1 + +//delay on start +g_start_delay 15 + +//warmup settings +g_warmup 0 +g_warmup_limit 60 + +//melee switch, better use with rm_nexus model +g_balance_melee 0 + +//team balance settings +g_balance_teams_prevent_imbalance 1 +g_balance_teams_force 30 + +//friendly fire settings +g_friendlyfire 0 +g_friendlyfire_force 0 +g_player_team_collisions 0 //Collisions with teammates + +//g_weaponreplace_tuba "crylink" //example of weapon replace + +//time and score limits +g_scorelimit 30 +g_timelimit 15 +g_ctf_scorelimit 10 +g_timelimit_suddendeath 10 + +//additional scores +g_score_bestweapon 1 +//enable damage score for dm, tdm and ft +set dm_g_score_damage 1 +set tdm_g_score_damage 1 +set ft_g_score_damage 1 + +//Handicap badass players +//g_badass_health_limit 100 +//g_badass_armor_limit 100 +//g_badass_color 68 //Red +//g_badass_kdr 1.5 //Activate by kill/death ratio +//g_badass_killcount 0 //Activate by kill row +//g_badass_leader 0 //Activate for leader \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3505200 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3' +services: + rexuiz: + image: rexuiz-server + volumes: + - ./config:/home/rexuiz/.rexuiz/data + ports: + - "26000:26000"