Giter Club home page Giter Club logo

flask-app's Introduction

Python Requirements Status Travis Coverage

Code forked from https://github.com/brennv/flask-app. Deploy configuration changed for test purposes

flask-app

Example app for demonstrating continuos integration/continuos deployment (CI/CD) workflows -- inspired by dockercloud-quickstart-python.

The example flask app connects to a redis instance and displays a simple visit counter and the hostname of the docker container serving the app.

Getting started

Install docker and run:

docker-compose up
# docker-compose stop

Otherwise, for the standalone web service:

pip install -r requirements.txt
python app.py

Visit http://localhost:5000

Development

Create a new branch off the develop branch for features or fixes.

After making changes rebuild images and run the app:

docker-compose build
docker-compose run -p 5000:5000 web python app.py
# docker stop flaskapp_redis_1

Tests

Standalone unit tests run with:

pip install pytest pytest-cov pytest-flask
pytest --cov=web/ --ignore=tests/integration tests

Integration and unit tests run with:

docker-compose -f test.yml -p ci build
docker-compose -f test.yml -p ci run test python -m pytest --cov=web/ tests
# docker stop ci_redis_1 ci_web_1

Commits tested via travis-ci.org. Test coverage reported to codecov.io. Requirements inspected with requires.io.

After testing, submit a pull request to merge changes with develop.

flask-app's People

Contributors

brennv avatar netor27 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.