Skip to content

egorovli/image-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-optimizer Go Report Card Docker Registry Docker Automated build Image Layers

image-optimizer is a Docker image based on the latest Alpine linux to provide microservice of optimizing jpeg images.

Usage

Run image-optimizer with docker:

$ docker run \
  -d \
  -p 8080:8080 \
  --name image-optimizer \
  egorovli/image-optimizer

Or embed it into your docker-compose.yml:

version: '3'
services:
  # ...

  image-optimizer:
    image: egorovli/image-optimizer
    expose:
      - "8080"

  some-service:
    # ...
    links:
      - image-optimizer

Configuration

Configuration is supplied via environment variables and the supports the following options:

Environment Variable Type Description Default Value
ENV string Environment production
PORT int Port to bind to 8080
HOST string Host to listen on 0.0.0.0
QUALITY int Default quality to use in cjpeg conversion 80
EXECUTABLE_PATH string Executable path to call cjpeg

API

POST, PUT /

Receives binary file and attempts to optimize it with cjpeg.

GET /health

Get current status of the app.

About

Simple standalone microservice to optimize jpeg images using mozilla/mozjpeg

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published