Giter Site home page Giter Site logo

beammp-docker's Introduction

CI Docker Hub pulls Docker Hub size trivy os-arch

This project provides a small, alpine based, docker container for the BeamMP game server and shows its usage in a docker-compose environment.

Motivation

Because there were no well-documented, alpine based BeamMP docker images out there, I did one by myself. Building the BeamMP server is needed, because the prebuilt linux binary uses glibc as C standard library implementation (instead of musl).

Variants

There are two tags of this docker image available, that are built nightly:

  • latest - Stable version of BeamMP
  • unstable - Unstable version of BeamMP (reflecting the master branch)

Usage

The sections below provides use cases for docker and docker-compose.

docker

Quick start:

docker run --name beammp-server \
           -p 30814:30814/tcp -p 30814:30814/udp \
           -e NAME='My first awesome Server' \
           -e AUTH_KEY='<insert auth-key>' \
           rouhim/beammp-server

docker-compose

First clone this repository and check docker-compose.yml if interested. The configuration should be done within the .env file.

To get started copy .env.example to .env and create the mod folder.

cp .env.example .env && mkdir client-mods server-mods

Adjust the values in the .env to your needs and run:

docker-compose pull && docker-compose up -d

Environment parameter

Variable name description default value
AUTH_KEY Mandatory! The authentication key used by the server. It is used to identify your server and is not optional.
DEBUG Set to true to enable debug output in the console. false
PRIVATE Set to true if you don't want to show up in the Server Browser. true
CARS How many vehicles a player is allowed to have at the same time. 1
MAX_PLAYER How many players your server can hold at a time. 10
MAP What the server map is. /levels/gridmap_v2/info.json
NAME What your server is called. This shows up in the Server Browser. BeamMP New Server
DESC What shows under the name when you click on the server. BeamMP Default Description
PORT This value must be identical to the containers exposed port. 30814

A new AUTH_KEY can be claimed on this site, you will need a Discord account for this. Note that the IP entered there does not matter, despite what the site claims. For more information refer to this wiki page.

Client mods

In the first place you should consider reading the official mods guide. Mods can be downloaded from the official BeamNG resources website. Just copy the downloaded zip file into the client-mods folder.

Custom maps

Copy the downloaded zip file into the client-mods folder.

Then have to find out the custom map path name (e.g.: /levels/car_jump_arena/info.json), to set it later as the map to load. To do so:

  1. Execute the shell command below, or open the zip file manually.
  2. Copy the absolute path to the info.json location (/levels/{map-name}/info.json).
  3. Set in .env file: MAP=/levels/{map-name}/info.json. Example: MAP=/levels/car_jump_arena/info.json

A simple way to print the full map path including info.json (unzip, grep and awk is required):

unzip -l PATH/TO/MAP.zip \
  | grep 'levels/.*/info.json' \
  | awk '{split($0,a," "); print "/"a[4]}'

Server mods

Server mods can be found in the BeamMP forum. Installation and configuration instructions are provided by each mod.

Augment ServerConfig.toml

If you want to specify additional values for a mod in the ServerConfig.toml file, just specify this environment variable in your .env file:

ADDITIONAL_SERVER_CONFIG_TOML = '
[SomeMod]
MyKey = "This is \'quoted\'"

[OtherMod]
enabled = true
some_numbers = [1, 2, 3]
'

Note that the single quotation marks are important at the beginning and end. If you want to use single quotes in the toml value they must be escaped with a backslash: key = "this is a \'quote\'"

Resources

beammp-docker's People

Contributors

rouhim avatar lionkor avatar renovate-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.