jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
160 stars 63 forks source link

Added Docker container support and documentation #70

Closed paulyuk closed 1 year ago

paulyuk commented 4 years ago

Implementing item in TODO list in Readme.developer.md. This change adds Docker assets needed to build a single server container, and/or build a set of orchestrated containers for server and database together, configured by jsserver.properties with default host, port and admin, and with health checks to avoid timing issues. Note we still need to remind the user to run create db and table scripts, however this is made easier by the scripts premounted in database container.
Both quickstart commands and conceptual information have been added to a ## To develop and run with Docker containers and Docker Compose section of the Readme.developer.md documentation. Without doing something unnatural, I did have to add Dockerfiles to root, and added supporting image content like property files and ODBC driver to a new /deploy folder (apologies I tried my best to tuck this away, but Docker files have a build context that want to see all included files in subdirectories, like \build\bin created by gradle). I'm open to alternate locations and styles if this is unwanted. In future updates it would be possible to make the entire build and test environment containerized too (imagine no need for gradle, python and other system installs), if that's interesting to the community.

jdmonin commented 4 years ago

Thank you, this looks interesting. I'll have time this weekend to look it over in detail.

jdmonin commented 4 years ago

This mostly looks great, thanks again.

For several reasons, I don't want to have a copy of a JDBC jar in the repo. Instead the dockerfile could download it, for example:
RUN wget -O /opt/app/mariadb-java-client-2.6.0.jar https://downloads.mariadb.com/Connectors/java/connector-java-2.6.0/mariadb-java-client-2.6.0.jar

I have a few comments on the Dockerfile and Readme.developer; see "Files changed" tab.

paulyuk commented 1 year ago

Thank you for review -- i haven't had time to properly maintain, so I'm closing out.