Merge lp:~widelands-dev/widelands-website/wlwebsite_docker into lp:widelands-website
Status: | Rejected |
---|---|
Rejected by: | SirVer |
Proposed branch: | lp:~widelands-dev/widelands-website/wlwebsite_docker |
Merge into: | lp:widelands-website |
Diff against target: |
171 lines (+108/-16) 5 files modified
Dockerfile (+49/-0) Makefile (+51/-0) pip_requirements.txt (+0/-1) run_docker.sh (+6/-0) settings.py (+2/-15) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands-website/wlwebsite_docker |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Widelands Developers | Pending | ||
Review via email: mp+317036@code.launchpad.net |
Description of the change
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:/
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 container with 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:/
[2] https:/
Sounds interesting.
I will test it in the next days.