Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 695 Bytes

File metadata and controls

27 lines (19 loc) · 695 Bytes

api-python

This is a program written in python. It is an simple API it intially registers itself with consul, and afterward it just responds to calls.

requirements

running program

You can use the following command on a bash shell to get the program running.

# start the application must have consul running
export CONSUL_PORT=locahost
export CONSUL_HOST=8500
pip install -r requirements.txt 
FLASK_APP=api.py flask run

dockerize program

docker build -t <dockerhub-user>/api-python:latest .
docker run -p 5000:5000 <dockerhub-user>/api-python