plainblack / Lacuna-Server-Open

The open source Lacuna Server repository.
36 stars 29 forks source link

Using Docker to create and run server images. #407

Closed icydee closed 8 years ago

icydee commented 8 years ago

Scripts to build a docker image, and to run the image on any system which has already installed the docker system (linux, OS X, or Windows).

This should speed up the time to set up a development environment and hopefully make it easier to deploy.

dmcbride commented 8 years ago

Following the instructions as given, I have a few comments:

  1. I don't see instructions to start the data container (tle-mysql-data). If we don't need it actually running, might I suggest saying so explicitly?
  2. Running "mysql" inside the prebuilt container fails predictably with ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' If I instead run the commands shown when I start the container, instead of what's in the setup_docker.txt, I get mysql running, and can continue. So I'd suggest the Initializing the database section mention that you still have to run the docker_client_start script before talking about the docker_exec.sh script. I'm so busy following the instructions that I didn't notice the console instructions as well :)
  3. I'm not sure about the schedulers - ships landing, buildings completing, etc. I do have a start script that may work here. However, it'd be really sweet if we got the crontab files into git so that the container could run those as well :)
dmcbride commented 8 years ago

Also, the captcha generation fails:

Can't locate GD/SecurityImage.pm in @INC (@INC contains: /data/Lacuna-Server/lib /data/apps/lib/perl5/site_perl/5.12.1/x86_64-linux /data/apps/lib/perl5/site_perl/5.12.1 /data/apps/lib/perl5/5.12.1/x86_64-linux /data/apps/lib/perl5/5.12.1 .) at generate_captcha.pl line 5.

Looks like the docker image is missing something :)

icydee commented 8 years ago

Thanks for the point about he tle-mysql-data container. It does not actually need to run, it just has to be present! (I will improve the documentation).

Thanks also for the pointer to the 'cat' function. My shell scripting needs work!

It's probably best to ignore this pull request now, I am working on another approach that has a better separation of concerns, but the fact that you were able to run the scripts in a docker container is validation of the approach!

I will try to incorporate your points in the next version.

icydee commented 8 years ago

let's not merge this pull request. Better one on the way...