Skip to content
/ D-Flask Public template

A docker container skeleton for Flask micro-services

Notifications You must be signed in to change notification settings

AmeyRuikar/D-Flask

Repository files navigation

Flask-skeleton Build Status codecov Maintainability

Containerized flask web-app, configured to run with gunicorn. Also contains examples for GET and POST requests.

Building the container:

Requires two build-time arguments: PORT and WORKERS

docker build -t car_app:0 --build-arg PORT=80 --build-arg WORKERS=2 .

Running the container:

docker run -p HOST_PORT:<PORT> car_app:0

Accessing the APIs:

- GET data   
    - http:https://<host>:<HOST_PORT>/info
    - http:https://<host>:<HOST_PORT>/info?type=suv
    - http:https://<host>:<HOST_PORT>/apiMetadata
- POST data(add a new entry)
    curl --request POST \
    --url http:https://<host>:<HOST_PORT>/addInfo \
    --header 'content-type: application/json' \
    --data '{
        "type": "suv",
        "name": "Escalade",
        "make": "Cadillac",
        "price": "90k"
    }'

About

A docker container skeleton for Flask micro-services

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published