Basic outline of a Tornado web app.
- Install Docker
- Build the nginx base image
cd setup/docker-base/nginx
and thendocker build -t app_nginx .
- Build the base Python image
cd setup/docker-base/nginx
and thendocker built -d app_python
These images install all of the dependancies for the JavaScript front-end client, and the Python application respectively. By creating separate dependency images we don't need to re-download and re-compile when we want to rebuild the application containers. The main containers should only copy our code over.
- From the root run
docker-compose build
- Run
docker-compose up
handlers/
- This directory contains all of the Python/Tornado API code.jsclient/
- Code and files pertaining to the JavaScript front-endapp/
- Backbone.js application codehandlebars/
- Handlebars HTML templatesnginx/
- Nginx configuration filesstatic/
- Static resources not managed by bowertasks/
- Grunt task codebower.json
- Bower dependanciesDockerfile
- Dockerfile for JavaScript front-end/NginxGruntfile.js
- Grunt task runner scriptpackage.json
- NPM dependancies
libs/
- Generic re-usable Python codemodels/
- Python database modelssetup/
- Python code used for database setup, and initialization