lennyaiko e2839a6d7c done
2025-03-27 12:38:33 +01:00
2025-03-27 12:32:08 +01:00
2025-03-27 11:41:10 +01:00
2025-03-27 11:29:36 +01:00
2025-03-27 11:29:36 +01:00
2025-03-27 11:29:36 +01:00
2025-03-27 12:32:08 +01:00
2025-03-27 12:38:33 +01:00
2025-03-27 11:29:36 +01:00
2025-03-27 11:29:36 +01:00

Flask API with Swagger in Docker

This repository contains a Flask API with Swagger documentation, running inside Docker containers.

Getting Started

Prerequisites

Ensure you have the following installed:

Clone the Repository

git clone <your-repo-url>
cd <your-repo-folder>

Setup and Run the Application

1. Build and Start the Containers

docker-compose up --build -d

This will:

  • Build the Flask API container.
  • Start the Swagger UI container separately.

2. Verify the Containers are Running

docker ps

3. Access the API

  • The Flask API will be available at:
    http://localhost:5000
    
  • The Swagger UI will be available at:
    http://localhost:9000
    
    You can interact with the API documentation and test endpoints from here.

Making API Requests

You can send requests using tools like curl or Postman:

curl -X GET http://localhost:5000/hello

Stopping the Application

To stop the running containers, use:

docker-compose down

Troubleshooting

  • If there are permission issues, try running Docker commands with sudo.
  • If ports are in use, change them in docker-compose.yml.
  • To rebuild the containers, use:
    docker-compose up --build -d
    
S
Description
No description provided
Readme 6.5 MiB
Languages
Python 99.8%
Dockerfile 0.2%