add_thread_to_direct_loan_call
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:
You can interact with the API documentation and test endpoints from here.
http://localhost:9000
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
Description
Languages
Python
99.8%
Dockerfile
0.2%