prcsousa/picturas-watermark-tool-ms

By prcsousa

Updated about 2 months ago

PictuRAS microservice (tool) to watermark an input image, generating a new watermarked output image.

Image
Message Queues
Web Servers
0

72

PictuRAS Watermark Tool MS Docker Images

These images are a quick way to run PictuRAS Watermark Tool Microservice. The source code is available on GitHub⁠.

Running

Watermark Tool MS uses RabbitMQ as a message-broker. This docker-compose.yml example runs both RabbitMQ and Watermark Tool MS:

services:
  rabbitmq:
    image: rabbitmq:4-alpine
    container_name: rabbitmq
    healthcheck:
      test: rabbitmq-diagnostics check_port_connectivity
      interval: 5s
      timeout: 30s

  watermark-tool-ms:
    image: prcsousa/picturas-watermark-tool-ms:latest
    container_name: watermark-tool-ms
    environment:
      - RABBITMQ_HOST=rabbitmq
      - PICTURAS_LOG_LEVEL=INFO # change or remove in production
    volumes:
      - ./images/src/:/images/src/
      - ./images/out/:/images/out/
    depends_on:
      rabbitmq:
        condition: service_healthy

Note: Watermark Tool MS assumes that the queue watermark-requests , the exchange picturas.tools , and the routing key results are already configured on RabbitMQ.

For more info, please refer to request_mocker on GitHub, namely the request_mocker.main.message_queue_setup method (here).

Environment variables

Environment VariableDescriptionDefault Value
RABBITMQ_HOSTThe hostname of the RabbitMQ server.localhost
RABBITMQ_PORTThe port number for the RabbitMQ server.5672
RABBITMQ_USERThe username for authenticating with RabbitMQ.guest
RABBITMQ_PASSThe password for authenticating with RabbitMQ.guest
RABBITMQ_REQUESTS_QUEUE_NAMEThe RabbitMQ queue name for requests.watermark-requests
RABBITMQ_RESULTS_EXCHANGEThe RabbitMQ exchange name to publish results.picturas.tools
RABBITMQ_RESULTS_ROUTING_KEYThe RabbitMQ routing key to publish results.results
PICTURAS_LOG_LEVELThe logging level for the application.WARN
PICTURAS_MS_NAMEThe name of the microservice instance.picturas-watermark-tool-ms
PICTURAS_NUM_THREADSThe number of threads used by the application.4
PICTURAS_WATERMARK_IMAGE_PATHThe file path to the watermark image../watermark.png

Docker Pull Command

docker pull prcsousa/picturas-watermark-tool-ms