Coder Social home page Coder Social logo

dv1562_lab2's Introduction

(Probably nothing to see here if you are not my teacher.)

Structure should be like this:

├── backend
│   ├── Dockerfile
│   ├── requirements.txt (list of pip libs used)
│   ├── run.py (the Python app itself (Flask/uWSGI)
│   ├── static
│   │   └── images (has to be pre-created)
│   └── templates
│       └── main.html (Jinja template)
├── db
│   └── init_db.sh (script that sets up the Postgres db on startup)
├── db_data (NB! this has to be pre-created, bind volume for db data)
├── docker-compose.yml
├── frontend
│   └── nginx.conf (conf for reverse-proxying to uWSGI via Nginx)
└── README.md

Usage:

  • install docker, docker-compose, docker-machine, docker-swarm
  • clone this repo and cd into parent directory, i.e. dv1562_lab2
  • mkdir db_data
  • docker stack deploy -c docker-compose.yml lab_2 (don't improvise with lab_2, the service names are hard-coded in configs)
  • wait a bit as services, esp. db, need time to start up
  • go to http://127.0.0.1/ to try the app

(Python 3.7, pip 19.1)

dv1562_lab2's People

Contributors

alionski avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.