Skip to content

codePau/devops-bookstore-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps Bookstore API

A Python Flask REST API to fetch book information in the form of JSON

Instructions

Running in Docker

The application can be deployed as a Docker container.

Firstly build the Docker image

docker build -t bookstore-api:1.0 .

Once the image has built you can start up the container by running:

docker run --rm -it -p 5050:5000 bookstore-api:1.0

Then you should be able to open up your browser and head to http://localhost:5050/books to see the JSON response

(Optional) Running Locally

The instructions assume that you have Python 3 installed.

If you do not have pipenv installed you'll need to install this first

pip install pipenv

Once pipenv is installed you can run the application locally by running:

pipenv install

followed by

pipenv run python api.py

NOTE: pipenv can be tempremental and varies from machine to machine if the above steps do not work skip to Running in Docker below

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.0%
  • Dockerfile 9.0%