← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands-website/wlwebsite_docker into lp:widelands-website

 

The proposal to merge lp:~widelands-dev/widelands-website/wlwebsite_docker into lp:widelands-website has been updated.

Description changed to:

Experimental branch, not sure if this should be merged.

I set up a docker workflow to run the website against a real mysql database on any development system (windows, mac, linux) easily. The goals here are

1) get rid of installing dependencies (like the python modules) on dev machines.
2) make sure all devs have always the exactly same set of python modules and python version,
3) dev workflows can use external tools (like wl_map_info) also on their dev machine, i.e. less differences between production and dev,
4) quicker setup for new devs.

How does this work? The flow is based around a tool named Docker (https://www.docker.com/). Docker runs containers and links them together. You can think of a container as a zero-cost virtual Linux machine (when running on Linux).

A container is described by a Dockerfile - which is a Build rule for assembling these virtual machines. And the core of this patch is a Dockerfile for the website. The idea is now to run a Dockercontainer that runs a mysql database[1], then build the website docker container and run it against this mysql. This means you run the full setup of the website on your dev machine.

Read the patch starting from the Makefile, then into the Dockerfile.

The workflow to get this up and running is this:

1) Install docker and do the docker tutorial[2] to get a basic understanding of docker.
2) bring up in one terminal the mysql database (make run_mysql).
3) build an image from the dockerfile: make docker
4) initialize the database and create a superuser: make init
5) run the website and try to upload a map: make serve

[1] https://hub.docker.com/_/mysql/
[2] https://docs.docker.com/engine/getstarted/

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/wlwebsite_docker/+merge/317036
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/wlwebsite_docker into lp:widelands-website.


References