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
Thank you for this great image. I like that you made it possible to create the password from the command line. You have the best instructions of all the current web2py images. But I have one suggestion, change APPLICATIONS to PATH TO APPLICATIONS. If you type in only a directory name it fails to work correctly. I think because the script can't make a directory in root folder. The user must type a path starting at the root like /usr/bin/web2py_apps.