Skip to content

wwmoraes/pvpgn-server-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PvPGN-PRO Docker

PvPGN Server Docker

Status GitHub Issues GitHub Pull Requests License


A simple docker and docker-compose for running a PvPGN-PRO server in no time

📝 Table of Contents

🧐 About

Yet another pvpgn-docker project. Aims to be:

  • ⌛ time-proof - builds binaries directly from source
  • 🔐 secure - uses non-privileged user and group to run the server
  • 🗜 small - based on Alpine linux
  • ⚖ lightweight - final image doesn't contain source or build tools

Most users should be fine running the official image. Use this image if you prefer Alpine's smaller footprint or if you plan to develop on PvPGN, as the dependencies are installed only once here.

🏁 Getting Started

Pull the image from Docker Hub:

docker pull wwmoraes/pvpgn-server

Then/or just run:

docker run -it wwmoraes/pvpgn-server

PvPGN-PRO is built and installed on the root filesystem. A sample configuration can be found at /etc/pvpgn. Data (logs, storage, scripts, etc) can be found at /var/pvpgn. These are the default locations bnetd will use, unless you configure it to use distinct paths.

🚀 Deployment

The configuration and data paths should be bound to volumes for persistence, and the ports should be published so you can access the server outside of the container:

docker run -it -p 6112:6112 -p 4000:4000 \
  -v <your-config-volume-or-path>:/etc/pvpgn \
  -v <your-data-volume-or-path>:/var/pvpgn \
  wwmoraes/pvpgn-server

IMPORTANT: Make sure the volumes/bind mount sources are readable and writable by the server user and group. The image default is 1001.

🎈 Usage

The build is done with Lua script support enabled, and MySQL support for the account backend.

You can create persistent local volumes for the config and data without starting the server with:

docker run --rm --entrypoint=true \
  -v <your-config-volume-name>:/etc/pvpgn \
  -v <your-data-volume-name>:/var/pvpgn \
  wwmoraes/pvpgn-server

Both volumes must not exist prior to this call for Docker to create and populate them with the image contents.

You can also copy the files to your host system using a temporary bind mount, for instance:

mkdir {var,etc}

docker run --rm --entrypoint=cp --user "$(id -u):$(id -g)" \
  -v $PWD/var:/mnt/var \
  wwmoraes/pvpgn-server \
  -r /var/pvpgn /mnt/var

docker run --rm --entrypoint=cp --user "$(id -u):$(id -g)" \
  -v $PWD/etc:/mnt/etc \
  wwmoraes/pvpgn-server \
  -r /etc/pvpgn /mnt/etc

Please refer to the upstream documentation on how to configure your server.

🎉 Acknowledgements

  • PvPGN-PRO and its maintainers, which are keeping alive the legacy of PvPGN
  • @ibepeer for feedback on #3, which ended on a BRANCH build arg (to clone from develop, for instance)