Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
15 stars 13 forks source link

Add dockerfile & docker-compose #49

Open cghislai opened 5 years ago

cghislai commented 5 years ago

Here is a dockerfile i thought mught be worth sharing.

You can setup a account on hub.docker.com to build it on each commit. Users then would be able to copy/adapt the provided docker-compose.yml and deploy a spads service in no time.

There are some issue though:

Yaribz commented 5 years ago

Thanks !

Concerning the issues you listed:

cghislai commented 5 years ago

Thanks for your feedback.

Yaribz commented 5 years ago

Given your explanations, I think the problem is just due to the exposed port (port on the host interface, reachable from Internet) being different from the port on which the spring server binary is listening (port in the docker container). I don't think it has anything to do with the IP addresses actually.

The listening port for the spring server can be configured in SPADS using the port hosting setting. This setting is used both to indicate which port the spring server binary must listen on and which port the clients must connect to (by sending the appropriate "port" parameter in the OPENBATTLE Spring lobby command). The problem, when using docker, is that these 2 ports can be different... One way to deal with the problem would be to force the internal port to be mapped to the same external port if possible. Another way, if the external port can be known in advance, would be to make a SPADS plugin which would allow configuring the spring binary to listen on one port and publish a different port on Spring lobby server...

Yaribz commented 5 years ago

I added support for fully automatic/unattended install in spadsInstaller.pl version 0.23 (only in unstable SPADS release for now), check this for more information.