prcsousa/picturas-watermark-tool-ms
PictuRAS microservice (tool) to watermark an input image, generating a new watermarked output image.
72
These images are a quick way to run PictuRAS Watermark Tool Microservice. The source code is available on GitHub.
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 exchangepicturas.tools
, and the routing keyresults
are already configured on RabbitMQ.For more info, please refer to
request_mocker
on GitHub, namely therequest_mocker.main.message_queue_setup
method (here).
Environment Variable | Description | Default Value |
---|---|---|
RABBITMQ_HOST | The hostname of the RabbitMQ server. | localhost |
RABBITMQ_PORT | The port number for the RabbitMQ server. | 5672 |
RABBITMQ_USER | The username for authenticating with RabbitMQ. | guest |
RABBITMQ_PASS | The password for authenticating with RabbitMQ. | guest |
RABBITMQ_REQUESTS_QUEUE_NAME | The RabbitMQ queue name for requests. | watermark-requests |
RABBITMQ_RESULTS_EXCHANGE | The RabbitMQ exchange name to publish results. | picturas.tools |
RABBITMQ_RESULTS_ROUTING_KEY | The RabbitMQ routing key to publish results. | results |
PICTURAS_LOG_LEVEL | The logging level for the application. | WARN |
PICTURAS_MS_NAME | The name of the microservice instance. | picturas-watermark-tool-ms |
PICTURAS_NUM_THREADS | The number of threads used by the application. | 4 |
PICTURAS_WATERMARK_IMAGE_PATH | The file path to the watermark image. | ./watermark.png |
docker pull prcsousa/picturas-watermark-tool-ms