Flask-on-Docker is a containerized Flask application with Postgres for development and a production-ready setup using Gunicorn and Nginx to handle static and media files.
Follow these steps to set up and run the project locally.
- Docker
- Docker Compose
-
Clone the repository
git clone https://github.com/your-username/flask-on-docker.git cd flask-on-docker
-
Build the development image
docker-compose up -d --build
-
Access the API endpoints at
http://localhost:8089
-
Usage upload image
http://localhost:8089/upload
display image
http://localhost:8089/media/IMG_FILENAME
-
Production
docker-compose -f docker-compose.prod.yml up -d --build