Merge branch 'two-servers'

This commit is contained in:
Daniel Ceregatti 2024-07-26 22:44:20 -07:00
commit 8ee1e5e91d
11 changed files with 544 additions and 77 deletions

View file

@ -30,12 +30,35 @@ git clone https://ceregatti.org/git/daniel/dayzdockerserver.git
cd dayzdockerserver cd dayzdockerserver
``` ```
Create a `.env` file that contains your user id. Usually the `${UID}` shell variable has this: Create a `.env` file for the web container that contains your user id. Usually the `${UID}` shell variable has this:
```shell ```shell
echo "export USER_ID=${UID}" | tee .env echo "export USER_ID=${UID}" | tee .env
``` ```
Repeat the above for server1, which uses .env1 (and so on):
```shell
echo "export USER_ID=${UID}" | tee .env1
```
But each server must also set its own unique ports and id:
```shell
echo "export SERVER_ID=1" | tee -a .env1
echo "export SERVER_PORT=2302" | tee -a .env1
echo "export RCON_PORT=2303" | tee -a .env1
echo "export STEAM_PORT=27016" | tee -a .env1
```
Repeat the above for each server you want to run, making sure the ports are unique across all servers:
```shell
echo "export USER_ID=${UID}" | tee .env2
echo "export SERVER_ID=2" | tee -a .env2
echo "export SERVER_PORT=2312" | tee -a .env2
echo "export RCON_PORT=2313" | tee -a .env2
echo "export STEAM_PORT=27116" | tee -a .env2
```shell
Build the Docker images: Build the Docker images:
```shell ```shell
@ -76,7 +99,7 @@ hostname = "Something other than Server Name"; // Server name
Install the server config file: Install the server config file:
```shell ```shell
docker compose run --rm server dz c docker compose run --rm server1 dz c
``` ```
The maintenance of the config file is a work in progress. The goal is to create a facility for merging changes into the config file and maintain a paper trail of changes. The maintenance of the config file is a work in progress. The goal is to create a facility for merging changes into the config file and maintain a paper trail of changes.
@ -86,18 +109,18 @@ Launch the stack into the background:
docker compose up -d docker compose up -d
``` ```
There will be nothing in mpmissions when the server container starts for the first time. A pristine copy of `dayzOffline.chernarusplus` will be copied from the `mpmission` volume to the server container. This will be the default map. To install other maps, see [Maps](#maps). There will be nothing in mpmissions when a server container starts for the first time. A pristine copy of `dayzOffline.chernarusplus` will be copied from the `mpmission` volume to the server container. This will be the default map. To install other maps, see [Maps](#maps).
To see the server log: To see the server log:
```shell ```shell
docker compose logs -f server docker compose logs -f server1
``` ```
## Stopping the server ## Stopping the server
To stop the DayZ server: To stop the DayZ server:
```shell ```shell
docker compose exec server dz stop docker compose exec server1 dz stop
``` ```
If it exits cleanly, the container will also stop. Otherwise a crash is presumed and the server will restart. Ideally, the server would always exit cleanly, but... it's DayZ. If it exits cleanly, the container will also stop. Otherwise a crash is presumed and the server will restart. Ideally, the server would always exit cleanly, but... it's DayZ.
@ -126,13 +149,13 @@ A terminal-based RCON client is included: https://github.com/indepth666/py3rcon.
The dz script manages what's necessary to configure and run it: The dz script manages what's necessary to configure and run it:
```shell ```shell
docker compose exec server dz rcon docker compose exec server1 dz rcon
``` ```
To reset the RCON password in the Battle Eye configuration file, simply delete it, and a random one will be generated on the next server startup: To reset the RCON password in the Battle Eye configuration file, simply delete it, and a random one will be generated on the next server startup:
```shell ```shell
docker compose run --rm server rm serverfiles/battleye/baserver_x64_active* docker compose run --rm server1 rm serverfiles/battleye/baserver_x64_active*
``` ```
Don't expect much from this RCON at this time. Don't expect much from this RCON at this time.
@ -159,13 +182,13 @@ Don't forget to [bring it back up](#run).
To stop the server: To stop the server:
```shell ```shell
docker compose exec server dz stop docker compose exec server1 dz stop
``` ```
The above sends the SIGINT signal to the server process. The server sometimes fails to stop with this signal. It may be necessary to force stop it with the SIGKILL: The above sends the SIGINT signal to the server process. The server sometimes fails to stop with this signal. It may be necessary to force stop it with the SIGKILL:
```shell ```shell
docker compose exec server dz force docker compose exec server1 dz force
``` ```
When the server exits cleanly, i.e. exit code 0, the container also stops. Otherwise, a crash is presumed, and the server will be automatically restarted. When the server exits cleanly, i.e. exit code 0, the container also stops. Otherwise, a crash is presumed, and the server will be automatically restarted.
@ -180,8 +203,8 @@ docker compose down
Interactive interface for managing mods. Interactive interface for managing mods.
``` ```
docker compose exec server dz activate id | add id1 | deactivate id | list | modupdate | remove id docker compose exec server1 dz activate id | add id1 | deactivate id | list | modupdate | remove id
docker compose exec server dz a id | add id1 | d id | l | m | r id docker compose exec server1 dz a id | add id1 | d id | l | m | r id
``` ```
Look for mods in the [DayZ Workshop](https://steamcommunity.com/app/221100/workshop/). Browse to one. In its URL will be Look for mods in the [DayZ Workshop](https://steamcommunity.com/app/221100/workshop/). Browse to one. In its URL will be
@ -232,9 +255,7 @@ This allows access to the server container using exec. You can then start and st
```shell ```shell
# Go into the server container # Go into the server container
docker compose exec shell bash docker compose exec server1 bash
# Because this is now in the environment and keeping the server from starting, it'd still keep the server from starting unless we unset it
unset DEVELOPMENT
# See what the server status is # See what the server status is
dz s dz s
# Start it # Start it

View file

@ -1,22 +1,33 @@
volumes: volumes:
# For steamcmd files and resource files used by the scripts # Only in the web container.
# For steamcmd files and resource files used by the scripts.
homedir_main: homedir_main:
# For Steam, for now # Shared by all containers.
homedir_server: # Mods.
mods:
# Where the server files will be installed # Where the server files will be installed
serverfiles: serverfiles:
# Server profile files
profiles:
# Upstream mission files # Upstream mission files
servermpmissions: servermpmissions:
# Server-specific volumes
# For Steam, for now
homedir_server1:
homedir_server2:
homedir_server3:
# Server mission files # Server mission files
mpmissions: mpmissions1:
# Mods mpmissions2:
mods: mpmissions3:
# Server profile files
profiles1:
profiles2:
profiles3:
services: services:
web: web:
profiles:
- main
build: build:
context: web context: web
args: args:
@ -37,21 +48,35 @@ services:
env_file: env_file:
- .env - .env
server: server-image:
&server-image
profiles:
- build
build: build:
context: server context: server
args: args:
- USER_ID - USER_ID
image: server-image
pull_policy: never
env_file:
- .env
server1:
<<: *server-image
profiles:
- main
user: ${USER_ID} user: ${USER_ID}
volumes: volumes:
- homedir_server:/home/user # Common volumes
- ./files:/files
- mods:/mods
- ./server:/server
- serverfiles:/serverfiles - serverfiles:/serverfiles
- servermpmissions:/mpmissions:ro - servermpmissions:/mpmissions:ro
- mods:/mods # Server-specific volumes
- mpmissions:/serverfiles/mpmissions - homedir_server1:/home/user
- profiles:/profiles - mpmissions1:/serverfiles/mpmissions
- ./files:/files - profiles1:/profiles
- ./server:/server
# To have the server show up in the LAN tab of the DayZ launcher, # To have the server show up in the LAN tab of the DayZ launcher,
# it must run under host mode. # it must run under host mode.
network_mode: host network_mode: host
@ -77,4 +102,49 @@ services:
# soft: -1 # soft: -1
# hard: -1 # hard: -1
env_file: env_file:
- .env - .env1
# # Copy and paste this for every other server you want to run, replacing 2 with 3, and so on.
# server2: # <-- here
# build:
# context: server
# args:
# - USER_ID
# user: ${USER_ID}
# volumes:
# # Common volumes
# - ./files:/files
# - mods:/mods
# - ./server:/server
# - serverfiles:/serverfiles
# - servermpmissions:/mpmissions:ro
# # Server-specific volumes
# - homedir_server2:/home/user # <-- here
# - mpmissions2:/serverfiles/mpmissions # <-- here
# - profiles2:/profiles # <-- here
# network_mode: host
# restart: no
# env_file:
# - .env2 # <-- here
#
# server3: # <-- here
# build:
# context: server
# args:
# - USER_ID
# user: ${USER_ID}
# volumes:
# # Common volumes
# - ./files:/files
# - mods:/mods
# - ./server:/server
# - serverfiles:/serverfiles
# - servermpmissions:/mpmissions:ro
# # Server-specific volumes
# - homedir_server3:/home/user # <-- here
# - mpmissions3:/serverfiles/mpmissions # <-- here
# - profiles3:/profiles # <-- here
# network_mode: host
# restart: no
# env_file:
# - .env3 # <-- here

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<env>
<territories>
<file path="env/wild_horse_territories.xml" />
<territory type="Herd" name="WildHorse" behavior="DZDeerGroupBeh">
<file usable="wild_horse_territories" />
</territory>
</territories>
</env>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<eventposdef>
<event name="AnimalWildHorse" />
</eventposdef>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<events>
<event name="AnimalWildHorse">
<nominal>8</nominal>
<min>1</min>
<max>4</max>
<lifetime>180</lifetime>
<restock>0</restock>
<saferadius>200</saferadius>
<distanceradius>0</distanceradius>
<cleanupradius>0</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>child</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="1" min="1" type="Animal_Horse_Brown"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Animal_Horse_White"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Animal_Horse_Gray"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Animal_Horse_Gray2"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Animal_Horse_Palomino"/>
</children>
</event>
</events>

View file

@ -0,0 +1,270 @@
<?xml version="1.0" encoding="UTF-8"?>
<territory-type>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4330.36" z="14227.3" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2653.96" z="13212.8" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3216.66" z="13426.1" r="160"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="4185.01" z="13741.3" r="100"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="3007.66" z="13318.8" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="3471.66" z="14015" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3796.36" z="14156.1" r="80"/>
</territory>
<territory color="1040187392">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2088.75" z="3073.13" r="70"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="1708.13" z="3279.38" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="1428.75" z="3817.5" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="1644.38" z="3579.38" r="70"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2469.38" z="4545" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2407.5" z="4426.88" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2166" z="3903" r="80"/>
</territory>
<territory color="1275068416">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="7245" z="13952.1" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="7388.57" z="13626.4" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7088.57" z="13570.7" r="80"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="8076.43" z="13645.7" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="7969.29" z="13425" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7187.5" z="12977.5" r="100"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="6422" z="10528.3" r="150"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="6752" z="9624.5" r="200"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5495.26" z="9596.11" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="6292.94" z="10069.7" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="6364.55" z="10984.5" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="6138.29" z="9404.59" r="100"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="6051.87" z="9662" r="100"/>
</territory>
<territory color="1275068416">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="7299.43" z="5933.14" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="7504.09" z="5809.09" r="90"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="7853.18" z="5631.82" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7824.55" z="6235.91" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7392" z="5604" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8650.71" z="4915.71" r="50"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="6953.57" z="5725.71" r="90"/>
</territory>
<territory color="1090519040">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4883.73" z="8257.91" r="90"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="3414.38" z="8572.5" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5394" z="8031" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4719" z="8550" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5523" z="7974" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5466" z="8922" r="80"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="11948.8" z="9466.25" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="11851.3" z="9740" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="11777.1" z="9975" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="10807.5" z="9455" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="11247.5" z="9110" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="11017.5" z="9687.5" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="12438" z="10032" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="12204" z="10263" r="120"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10176.1" z="8354.83" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9878.38" z="7188.88" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="11143.5" z="7173.67" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="9894" z="7782" r="60"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="10866" z="7418.82" r="80"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="10470.5" z="7149.25" r="70"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="12375" z="8784" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="12087" z="8895" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="12720" z="8862" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="12507.5" z="8150" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="12375" z="7917.5" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="12332.5" z="8227.5" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="12997" z="7246.5" r="90"/>
</territory>
<territory color="1207959552">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="1521.67" z="14965" r="90"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="1601.67" z="14888.3" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="1346.67" z="14815" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="1860" z="14455" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2067.5" z="14127.5" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2955" z="15097.5" r="90"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3673" z="12793.5" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3915.5" z="12189.2" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3453.72" z="12074.4" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3621.5" z="12371" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3538.93" z="11887.7" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="4408.13" z="11928.1" r="60"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="2934.72" z="12035.6" r="67.5"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8357.83" z="3231.58" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9400.33" z="3337.42" r="110"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8100.72" z="3535.39" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8551.17" z="3178.25" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="7307.04" z="3743.38" r="200"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7507.51" z="3901.91" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="8466.17" z="2653.25" r="120"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8326.15" z="10722.7" r="60"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8622.69" z="10893.5" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8734.29" z="10446.4" r="90"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="9107.29" z="9635.47" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8973" z="9993" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8109" z="10341" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7629" z="10476" r="120"/>
</territory>
<territory color="822083584">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8677.5" z="12267.5" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="9450" z="12367.5" r="70"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9211.25" z="11902.5" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="9355" z="11870" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8910" z="11448.3" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9308.33" z="11495" r="100"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8111.67" z="6893.33" r="80"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="8556.67" z="6855" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8240" z="6586.67" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="7990" z="6588.33" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8173.33" z="5733.33" r="60"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8052.5" z="6252.5" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9077.5" z="6120" r="100"/>
</territory>
<territory color="1056964608">
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="3195.77" z="8405.77" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2988.75" z="8280" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2409.38" z="8932.5" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2225.63" z="8769.38" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="1830" z="8488.13" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2690" z="7960" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2660" z="7692.5" r="100"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="2400" z="9471" r="100"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2176.5" z="5418.5" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2320.63" z="5935.63" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="1399.75" z="6590" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="1407" z="6874.5" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2173.13" z="6098.75" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2113.5" z="5631.5" r="90"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="2551.07" z="5952.86" r="80"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3336.1" z="4354.4" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3313.75" z="3344.82" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3237.5" z="3608.93" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2760.85" z="4070.18" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4090.25" z="3790.62" r="60"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="4550.35" z="4049.86" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3956.25" z="4203.93" r="150"/>
</territory>
<territory color="2841534046">
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5171.38" z="14633.5" r="105"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5281.38" z="14425.5" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="6152.82" z="13652.8" r="120"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="5691.38" z="14262.8" r="67.5"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="6338.13" z="14477.7" r="70"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5795" z="14543" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5988.38" z="14601.3" r="80"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5625.16" z="6843.25" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5709.16" z="6378.75" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="6140.36" z="5684.29" r="50"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4949.61" z="6891" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="6163.91" z="5332.25" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5651.16" z="6973" r="90"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="5832.86" z="5232.5" r="80"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="13216.8" z="12755.9" r="70"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="13011.2" z="13097.6" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="13158.9" z="13303.8" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="13465" z="12577.1" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="12822.5" z="13141.3" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="13250" z="12368.8" r="120"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="12619.2" z="14203.8" r="80"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8322.5" z="14925" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9222.5" z="15007.5" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8092.5" z="15085" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="6895" z="15035" r="80"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="6862.5" z="14460" r="60"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8842.5" z="14965" r="110"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10609.9" z="5935.18" r="60"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="10733.1" z="5976.43" r="50"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="10866" z="5659.29" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10461" z="5597.14" r="70"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="9823.5" z="4660" r="70"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9989.5" z="5229.5" r="70"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5805.75" z="12395" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5338" z="11852.1" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4503.88" z="12284.1" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5469.75" z="11737.5" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5350.13" z="12112.6" r="97.5"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="4720.25" z="12203" r="60"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="5883.68" z="12562.2" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4923" z="12387" r="80"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="8493" z="9291.75" r="200"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10032.4" z="8931.75" r="90"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="10201.5" z="8163.75" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9473" z="9039.61" r="100"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="7563" z="9236.75" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8704.25" z="8784.25" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10644.3" z="8743" r="150"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5943.8" z="3503.13" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5554.43" z="3160.63" r="150"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="5235.63" z="3872.77" r="120"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4399.78" z="2873.13" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5053.84" z="2666.7" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="5494.2" z="3570.8" r="100"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="4839.13" z="3040.38" r="67.5"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3349.14" z="10748.7" r="180"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3618.57" z="9301.07" r="100"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3374.33" z="10129.2" r="100"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3641.46" z="10573.9" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3828.54" z="9774.04" r="110"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="4225.88" z="9585.7" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3060.31" z="10615.5" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="4079.14" z="9675.74" r="100"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10411.5" z="12483" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10587.8" z="12286.5" r="120"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="11907.5" z="12327.5" r="90"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="10975" z="12577.5" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="11110" z="12957.5" r="110"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="10945" z="12127.5" r="90"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9058.75" z="13568.8" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9247.5" z="13934.4" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="9436.25" z="13328.8" r="60"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="9830" z="13506.9" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8838.75" z="13825" r="70"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="8635" z="14320" r="60"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="9164.38" z="13298.1" r="67.5"/>
</territory>
<territory color="2841534046">
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="1960.71" z="11492.1" r="60"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2256.43" z="11427.9" r="120"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="2648.57" z="11517.9" r="80"/>
<zone name="Water" smin="0" smax="0" dmin="0" dmax="0" x="3085.71" z="11680.7" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3276.43" z="11625" r="80"/>
<zone name="Rest" smin="0" smax="0" dmin="0" dmax="0" x="3445.71" z="11307.9" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="3310" z="10975" r="80"/>
<zone name="Graze" smin="0" smax="0" dmin="0" dmax="0" x="2817.5" z="10967.5" r="110"/>
</territory>
</territory-type>

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# This is run in the directory with the target files
# Copy the territory file over
cp ${FILES}/mods/${ID}/horses_chernarus.xml env/wild_horse_territories.xml

View file

@ -0,0 +1,3 @@
CFGENVIRONMENT=local
CFGEVENTSPAWNS=local
EVENTS=local

1
files/mods/@DayZHorse Symbolic link
View file

@ -0,0 +1 @@
3295021220

View file

@ -3,7 +3,7 @@
# Set PS1 so we know we're in the container, should we exec into it. # Set PS1 so we know we're in the container, should we exec into it.
cat > .bashrc <<EOF cat > .bashrc <<EOF
alias ls='ls --color' alias ls='ls --color'
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-server:\w\$ " export PS1="${debian_chroot:+($debian_chroot)}\u@dz-server${SERVER_ID}:\w\$ "
unset DEVELOPMENT unset DEVELOPMENT
EOF EOF

View file

@ -1,48 +1,39 @@
FROM debian:bookworm-slim FROM debian:bookworm-slim AS download
# Replace shell with bash so we can source files # Install _only_ the necessary packages to download the .net SDK and Steamworks .net SDK
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set debconf to run non-interactively and agree to the SteamCMD EULA
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& echo steam steam/question select "I AGREE" | debconf-set-selections \
&& echo steam steam/license note '' | debconf-set-selections \
&& dpkg --add-architecture i386
# Add backports and contrib
RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Components: main contrib non-free/g'
# Install _only_ the necessary packages
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
binutils \ ca-certificates \
curl \
git \
gwenhywfar-tools \
jq \
libxml2-utils \
locales \
nano \
procps \
wget \ wget \
rename \ unzip
steamcmd \
xmlstarlet
# Set the locale # Download dotnet SDK to build the steam API client
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen RUN cd /tmp && \
ENV LANG en_US.UTF-8 wget -q https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.303/dotnet-sdk-8.0.303-linux-x64.tar.gz
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Steamcmd needs its path added, as it ends up in /usr/games. # Download the Steamworks .net package
# Our server script is bind mounted in /files in docker-compose. RUN cd /tmp && \
ENV PATH /usr/games:/files/bin:/web/bin:${PATH} wget -q https://github.com/rlabrecque/Steamworks.NET/releases/download/20.2.0/Steamworks.NET-Standalone_20.2.0.zip
# Extract the dotnet SDK
RUN cd /usr/local && \
mkdir -p dotnet && \
cd dotnet && \
tar xfz /tmp/dotnet-sdk-8.0.303-linux-x64.tar.gz
# Extract the Steamworks .net SDK
RUN mkdir -p /usr/local/steamworks.net && \
cd /usr/local/steamworks.net && \
unzip /tmp/Steamworks.NET-Standalone_20.2.0.zip
# Add bercon https://github.com/WoozyMasta/bercon
RUN wget -q https://github.com/WoozyMasta/bercon/releases/download/1.0.0/bercon \
&& chmod +x bercon \
&& mv bercon /usr/bin
# Install nodejs # Install nodejs
RUN mkdir /usr/local/nvm RUN mkdir /usr/local/nvm
ENV NVM_DIR /usr/local/nvm ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 20.12.2 ENV NODE_VERSION 20.15.1
RUN echo $NODE_VERSION
# Install nvm with node and npm # Install nvm with node and npm
RUN wget -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \ RUN wget -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
@ -51,8 +42,84 @@ RUN wget -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh |
&& nvm alias default $NODE_VERSION \ && nvm alias default $NODE_VERSION \
&& nvm use default && nvm use default
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules FROM debian:bookworm-slim AS build
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
COPY --from=download /usr/local/dotnet /usr/local/dotnet
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
libicu72 \
libssl3
# Disable MS telemetry
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
# Build the steam API client
COPY client /usr/local/client
#RUN cd /usr/local/client && \
# /usr/local/dotnet/dotnet build -c Release
FROM debian:bookworm-slim
COPY --from=download /usr/local/dotnet /usr/local/dotnet
COPY --from=download /usr/local/steamworks.net /usr/local/steamworks.net
COPY --from=download /usr/bin/bercon /usr/bin/bercon
COPY --from=download /usr/local/nvm /usr/local/nvm
COPY --from=build /usr/local/client/ /usr/local/client
ENV DOTNET_ROOT /usr/local/dotnet
# Add backports, contrib, and non-free
RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Components: main contrib non-free/g'
# Set debconf to run non-interactively and agree to the SteamCMD EULA
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& echo steam steam/question select "I AGREE" | debconf-set-selections \
&& echo steam steam/license note '' | debconf-set-selections \
&& dpkg --add-architecture i386
# Install _only_ the necessary packages
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
binutils \
curl \
git \
gwenhywfar-tools \
jq \
libicu72 \
libssl3 \
libxml2-utils \
locales \
nano \
procps \
wget \
rename \
steamcmd \
xmlstarlet \
unzip
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# This was installed in the download stage
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION=20.15.1
ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Steamcmd needs its path added, as it ends up in /usr/games.
# Our server script is bind mounted in /files in docker-compose.
ENV PATH=/usr/games:/files/bin:/web/bin:${PATH}
# Shut steamcmd up
RUN cd /usr/lib/i386-linux-gnu && ln -s /web/bin/steamservice.so
# Setup a non-privileged user # Setup a non-privileged user
ARG USER_ID ARG USER_ID
@ -62,14 +129,6 @@ RUN groupadd -g ${USER_ID} user && \
mkdir -p /home/user /serverfiles/mpmissions /serverfiles/steamapps/workshop/content /web && \ mkdir -p /home/user /serverfiles/mpmissions /serverfiles/steamapps/workshop/content /web && \
chown -R user:user /home/user /serverfiles /web chown -R user:user /home/user /serverfiles /web
# Shut steamcmd up
RUN cd /usr/lib/i386-linux-gnu && ln -s /web/bin/steamservice.so
# Add bercon https://github.com/WoozyMasta/bercon
RUN wget https://github.com/WoozyMasta/bercon/releases/download/1.0.0/bercon \
&& chmod +x bercon \
&& mv bercon /usr/bin
# Use our non-privileged user # Use our non-privileged user
USER user USER user