Servers for the web application 2 course.
Python Nginx Shell PHP Ruby HTML
Latest commit 51cb07a Feb 3, 2017 @greut greut Simplification of the postgresql step.
Signed-off-by: Yoan Blanc <>
Failed to load latest commit information.
docker Simplification of the postgresql step. Feb 3, 2017
files Fix proxy_pass. Jan 30, 2017
.gitignore Generating index.html file too. Dec 20, 2016
build.yml Python3 container using uwsgi Nov 22, 2016
docker-compose.yml Big refactoring... Dec 9, 2016

WebApp Server

Join the chat at

The setup scripts to create development environments for many groups.


  • Docker >1.13
  • Python 3 (pip & venv)
  • libyaml-dev



The configuration is done via a TSV file (config/students.tsv). Here is its format:

Lastname Firstname Email Group Github Image1 Team1 Image2 Team2 Comment
Bon Jean INF3 jeanjean Laravel ninjas Rails funky -
Blanc Yoan Teacher greut Laravel admin Python admin -

This is how this file is used:

  • Lastname no particular usage
  • Firstname becomes the username
  • Group no particular usage
  • GitHub identifier to download the SSH public keys
  • ImageX stores the information of which container to use
  • TeamX will be the name of the virtual host and identify a container
  • Comment no particular usage

Public keys

To download the public keys, run this python script:

# setup
$ python3 -m venv .
$ . bin/activate
$ pip3 install -r requirements.txt

$ scripts/ config/students.tsv config/keys/ <github_username> <password_or_key>

The key is a personal access token to avoid being rate limited by the API.


Based on the same TSV file, you can generate docker-compose.yml file.

$ scripts/ config/students.tsv docker-compose.yml

Database creation

$ script/ docker-compose.yml


If you don't want to use the publicly available containers, you can build them yourself.

# Base container
$ docker-compose -f build.yml build base
# Laravel container
$ docker-compose -f build.yml build laravel
# Python container
$ docker-compose -f build.yml build python
# Rails container
$ docker-compose -f build.yml build rails

Run via docker-compose

Create a docker-compose.yml file base on the sample one.

Run the container(s)

docker-compose up -d


The databases are open the external world, hence we must modify the super admin password. Setting up a good one during the startup won't be as effective as it will be visible from within the containers anyway.



Changing MySQL root password because the above value will be passed to each linked containers.

# 5.6
$ mysqladmin -h -u root -p'root' password 's3cur3@P45sw0rd'

# 5.7
$ mysql -h -u root -proot
> SET PASSWORD FOR 'root'@'%' = PASSWORD('s3cur3@P45sw0rd');


Changing Postgres password because the above value will be passed to each linked containers.

$ psql -h \
    -U postgres \
    -c "ALTER USER postgres WITH PASSWORD 's3cur3@P45sw0rd';"