Sign inSign up

georgegozal/flask-books-api

By georgegozal

•Updated about 3 years ago

Image
0

66

georgegozal/flask-books-api repository overview

⁠Flask Books API Docker Image Documentation

⁠Introduction

This documentation provides information on how to use the georgegozal/flask-books-api Docker image to run the Flask Books API. The Docker image includes the Flask Books API along with PostgreSQL integration.

⁠Prerequisites

Before using the Docker image, ensure that you have the following prerequisites: Docker installed on your system. If not, you can download and install Docker from here⁠.

⁠Create Docker Network

docker network create flask-books

⁠Connecting to PostgreSQL

The Flask Books API requires a PostgreSQL database. Make sure you have a PostgreSQL server running on the flask-books network. You can create a PostgreSQL container using the following command:

docker network create flask-books
docker run -d --name postgres-db --network flask-books -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=books postgres:latest

⁠Pulling the Docker Image

To pull the Flask Books API Docker image from Docker Hub, use the following command:

docker pull georgegozal/flask-books-api:1.0.0

⁠Running the Flask Books API Container

Once you have the Docker image, you can run the Flask Books container using the following command:

docker run -p 5000:5000 --name flask_books_api -e POSTGRES_HOST=postgres-db -v /app/app --net flask-books georgegozal/flask-books-api:1.0.0

⁠Accessing the Flask Books API

Once the container is running, you can access the Flask Movies app by navigating to http://localhost:5000 in your web browser.

Tag summary

Content type

Image

Digest

sha256:3d6223145…

Size

36.4 MB

Last updated

about 3 years ago

docker pull georgegozal/flask-books-api:1.0.0