Sign inSign up

wilddev/images

By wilddev

•Updated 10 months ago

Reactive images processing service. Works on RabbitMQ and MongoDB.

Image
0

1.7K

wilddev/images repository overview

⁠Quick reference

⁠Supported tags

⁠Overview

This is a reactive images processing service that may be used to enpower your apps with the images support.
It allows to maintain a number of image versions to be rendered on various devices just like desktops, phones or tables.

⁠How it works:

  1. Upload an image \ Provide an external link
  2. Get the generated ID
  3. Receive a webhook once the image is ready


Then it may be accessed in this way:

https://test.website/images/find/650f35128d400f39c6a46ee2?width=1024

⁠Get started

The basic run example:

docker run -d -e ALLOWED_ORIGINS=http://image-uploader-1:8080,https://test.website \
              -e MONGODB_PASS=test \
              -e RABBIT_PASS=test \
              -e WEBHOOK_URL=http://image-uploader-1:8080/images/webhook \
              -e SERVER_PORT=8080 \
              -p 8080:8080 \
              wilddev/images:latest

Deploy it in a Swarm:

version: "3.9"
services:
  rabbitmq-cron-images:
    image: wilddev/rabbitmq-cron:latest
    restart: unless-stopped
    environment:
      - RABBIT_HOST=rabbitmq
      - RABBIT_USER=images
      - RABBIT_PASS=test
    networks:
      overlay:
        aliases:
          - rabbitmq-cron-images
  images:
    image: wilddev/images:latest
    depends_on:
      - rabbitmq-cron-images
    restart: unless-stopped
    environment:
      - ALLOWED_ORIGINS=http://image-uploader-1:8080,https://test.website
      - MONGODB_PASS=test
      - RABBIT_PASS=test
      - WEBHOOK_URL=http://image-uploader-1:8080/images/webhook
      - SERVER_PORT=8080
    ports:
      - "8080:8080"
    networks:
      overlay:
        aliases:
          - images
...

Available settings list and their default values:

ALLOWED_IMAGES=JPEG,PNG,WEBP
ALLOWED_ORIGINS=http://localhost
IMAGE_POLL_SIZE=100
IMAGE_TIMEOUT=10m
JAVA_OPTS=-Xmx512M
MAX_FILE_SIZE=10485760
MONGODB_HOST=mongodb
MONGODB_PORT=27017
MONGODB_DATABASE=images
MONGODB_USER=images
MONGODB_PASS=test
RABBIT_HOST=rabbitmq
RABBIT_USER=images
RABBIT_PASS=test
RABBIT_PORT=5672
SERVER_PORT=8080
TASKS=CROP,RESIZE
WEBHOOK_POLL_SIZE=100
WEBHOOK_TIMEOUT=10m
WEBHOOK_URL=''

⁠Notes

Ensure that rabbitmq-cron service runs on the same RabbitMQ username and initially was launched first.

⁠Security

The service is unprotected by default! Ensure the only accessor endpoint is publicly available and your proxy server is properly configured.

Tag summary

Content type

Image

Digest

sha256:18f00a4e1…

Size

121.8 MB

Last updated

almost 2 years ago

docker pull wilddev/images