Git Product home page Git Product logo

photon-docker's Introduction

photon-docker

This repository contains the configuration required to run Exit Games' PhotonEngine server under Docker on a Linux host.

It may be unstable, you are on your own.

Legal disclaimer

This project is not endorsed by Exit Games and does not reflect the views or opinions of Exit Games or anyone officially involved in producing or managing Exit Games properties.

Building

The build process is fairly straightforward, albeit there are some caveats:

To proceed with building the container, place the deploy folder of your Photon installation inside the photon-server directory, and run docker build

Running

An example docker-compose.yml file is included in this repository. It is configured to accept ./photon.license as the license file that will be passed onto Photon.

Setting IPs

Due to a bug in an undetermined component (seems to be related to how the low-level C++ socket framework Photon uses binds to IPs), you are not able to bind to 0.0.0.0.

You will have to change the IP addresses to bind on by editing the deploy/bin_Win64/PhotonServer.config file.

Please be aware that the included entrypoint.sh script will automatically replace any IPs that point to 127.0.0.1 with the internal IP of the Docker container (fetched using hostname -i), and will also replace the GameServer's Public IP Address configuration with the EXTERNAL_IP environment variable.

Disabling Performance Counters

Wine does not implement Windows Performance Counters, and as such, when Photon tries to register them, it crashes. The fix is to disable Performance Counters inside of Photon, which is hidden behind an undocumented configuration option.

In the LoadBalancing project, the EnablePerformanceCounters key has to be set under configuration.Photon.LoadBalancing for both the MasterServer and the GameServer as seen below:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <LoadBalancing>
      <EnablePerformanceCounters>False</EnablePerformanceCounters>
      <GCLatencyMode>Interactive</GCLatencyMode>
    </LoadBalancing>
    ...

The same applies for the NameServer project, only replacing LoadBalancing with NameServer in the key path.

photon-docker's People

Contributors

gtsatsis avatar

Stargazers

 avatar

Watchers

 avatar  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.