chitholian / image-converter

A simple microservice to convert and resize images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Image Converter Microservice

A very simple microservice to convert between image formats and resize.

Basic Requirements

  • Python 3.10+
  • pip
  • virtualenv

For Containerization

  • Podman
  • Docker

Create Python Virtual Environment

virtualenv .venv
source .venv/bin/activate

Install Required Packages

pip install -r requirements.txt

Run WSGI Server

cd src/
gunicorn image_converter:app run 

Now, you can browse http://127.0.0.1:8000 to view and test API documentation in Swagger.

Build Container Image

Using Podman

podman build -t image-converter .

Run the built container image:

podman run --rm -d -p 8000:8000 localhost/image-converter:latest

Using Docker

docker build -t image-converter .

Run the built container image:

docker run --rm -d -p 8000:8000 localhost/image-converter:latest

Demo Credentials

Following credentials can be used for HTTP Basic Auth for testing:

  • Username: cns_demo
  • Password: cns_demo

About

A simple microservice to convert and resize images

License:MIT License


Languages

Language:Python 62.3%Language:HTML 25.5%Language:Dockerfile 12.1%