Giter Site home page Giter Site logo

flask-microservices-users's Introduction

flask-microservices-users

This is just me messing around with http://testdriven.io take on microservices.

It will perhaps impact CD2 in the future. (It never did)

Notes

  • hard-bound to SQLAlchemy
  • User Model is actually CRUD wrapper repo, not a Model
  • Interesting take on application knowing if it's in test, development or production
  • docker-compose needs upgrading from xenial stock to follow
  • live volume mount rather than baking application code into image (less unique containers needed)

Cloning & use

git clone [email protected]:Lewiscowles1986/flask-microservices-users.git
docker-compose up -d --build

# Rebuild DB command and test command
docker-compose exec -it users-service python manage.py recreate_db
docker-compose run --rm users-service python manage.py test

Note

This started out as pretty much copy->paste. Follow the tutorial at http://testdriven.io if you want to learn this stuff. The repo will probably be deleted at some point.

Opinion (2 years later)

It's pretty vanilla and I'm not sure I agree with everything the tutorial says to do.

  • Having healthchecks and using modern docker-compose and baking source-code into the image is a not awful deployment strategy, but it needs work.

If you were to push the docker-image built to dockerhub, you should capture the SHA of your commit (could correspond to a release or tag) so that you're not reliant on latest and can experiment with different versions of micro-services. The easiest command to get started with that is git rev-parse --verify HEAD

  • SQLAlchemy is a hot mess and should not be used

I currently work at a place that uses SQLAlchemy. It's slow, it makes surprises about behaviour easy and it encourages poor reasoning about systems that I've not seen with parametrized SQL.

flask-microservices-users's People

Contributors

lewiscowles1986 avatar

Watchers

 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.