Giter Site home page Giter Site logo

flask_microservices_project's Introduction

Flask Microservices Project:

Building a Microserviecs using Flask

A) Credits:

B) Technologies Used:

  1. Python
  2. Flask
  3. Docker

C) Services:

This consists of 2 sevices:

  1. hello_world_service
  2. ping_service

C-1) Hello World Service:

Port:

3000

Endpoints:

1) (GET) /

Returns: Hello, World!
http://127.0.0.1:3000/

How to run:

python services/hello_world_service/app.py

C-2) Ping Service:

Port:

3001

Endpoints:

1) (GET) /ping

Returns: Pong

http://127.0.0.1:3001/ping

How to run:

python services/ping_service/app.py

D) Using Docker:

D-1) Generating the images:

Inside the folder of each service, there is a file called:
image_builder.sh
When you double click this file , the image will be generated.

D-2) Running the Containers:

Go to this directory:
Docker/containers
There you will find these files:

  1. container_builder__all.sh
    • This builds the containers of the images ofthe services
  2. container_builder_hello_world.sh
    • This builds the container of service of the hello_world image
  3. container_builder_ping.sh
    • This builds the container of service of the ping image

D-3) Deleting The Containers:

In the same directory, as the previous article.
Docker/containers
There you will find these files:

  1. container_deleter_all.sh
    • deletes all the containers related to the services
  2. container_deleter_hello_world.sh
    • deletes the hello_world service container.
  3. container_deleter_ping.sh
    • deletes the ping service container.

D-4) Docker Compose:

Inside the folder Docker, there are 3 files:

  1. compose.sh
    • Double clicking this file will compose the services
  2. docker-compose.yml
    • This file contains the compose specifications
  3. container_deleter__all.sh
    • Double clicking this file will delete all the compose containers

Now using your browser, check these links:

  1. http://127.0.0.1:3000/
    • The response will be : Hello, World!
  2. http://127.0.0.1:3001/ping
    • The response will be : Pong

flask_microservices_project's People

Contributors

omarthinks avatar

Watchers

James Cloos avatar  avatar

Forkers

shivansh-p

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.