web2py server with mysql (ubuntu 14.04, apache2)
Image generated from Dockerfile (v0.52) based on script http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh, but with mysql database server instead of postgres. Python packages installed: python-pil, python-ldap, python-mysqldb.
- sudo docker run -d -p 80:80 -p 443:443 scinnovation/web2py
(basic usage with services on ports 80 (http) and 443 (https), web2py admin password: admin)
- sudo docker run -d -p 80:80 -p 443:443 -e web2py_password='mypasswd' scinnovation/web2py
(just as above, but admin password "mypassword" set by environment variable)
- sudo docker run -d -p XXXX:80 -p YYYY:443 -v APPLICATIONS:/applications -e web2py_password='mypassword' -e web2p_ssl_port=YYYY scinnovation/web2py
(individual admin password "mypassword" and services on ports XXXX (http) and YYYY (https). Applications folder is mounted from local directory APPLICATIONS.)
- The self-signed ssl-keys used are not included in the image but generated with the first start of a container. The certificate might need to be accepted manually upon first access with a web browser.
- The environment variable web2py_password sets the web2py admin password. Please replace it by an appropriate password of your choice in production environments.
- Please mind, that the standard applications admin, welcome, and examples shipped with the web2py source by default will be copied to the applications folder with the initial start of a container. The applications will be replaced if already present in a mounted folder. This behaviour can be prevented by setting the environment variable web2py_default_applications to false (i.e. by including -e web2py_default_applications=false in the above commands).
- No password is required for the mysql root user, since it can be accessed from within the container only.
- v0.5: initial stable version
- v0.51: removed automatic redirection from http to https in apache configuration
- v0.52: fixed issue with http access by introducing a seperate wsgi daemon process for ssl connections
Docker Pull Command