Philter 1.6.0 Docker Containers

Philter 1.6.0 Docker containers are now available. To run the containers:

curl -O https://raw.githubusercontent.com/mtnfog/philter/master/docker-compose.yml
docker-compose up

This will spin up the Philter containers. Once running you can send Philter some text for filtering:

curl -k https://localhost:8080/api/explain --data "George Washington was president and his ssn was 123-45-6789." -H "Content-type: text/plain"

If you’re familiar with running Philter containers then you’ll notice these instructions have not changed! But there is something new (and exciting!). Philter can now be configured using environment variables instead of having to manage the application.properties file inside of the container. We can modify the docker-compose file to include properties as environment variables. Here’s an abbreviated example:

version: '3'
services:
  philter:
    depends_on:
      - "redis"
      - "philter-ner"
    environment:
      - PHILTER_CACHE_REDIS_ENABLED=true
      - PHILTER_CACHE_REDIS_HOST=redis
      - PHILTER_CACHE_REDIS_PORT=6379
      - PHILTER_CACHE_REDIS_AUTH_TOKEN=randompassword
      - PHILTER_LICENSE_KEY=
      - PHILTER_NER_ENDPOINT=http://philter-ner:18080/
...

In this snippet we have added a few environment variables to configure a Redis cache for Philter. That’s it! We’re excited about this new capability and hope that it makes Philter much easier to configure in your container environments.

Any of the Philter settings can be set as environment variables. Just prepend PHILTER_ to the property name and change periods to underscores. For an example, to enable span disambiguation the property is span.disambiguation.enabled, to set it as an environment variable use PHILTER_SPAN_DISAMBIGUATION_ENABLED.