Skip to content

Latest commit

 

History

History

processor

The processor service handles request for entry text processing. It exposes an
HTTP interface which accepts the text and book id of an entry which is then
uses for processing.


=== Requirements

- See requirements for web application


=== Development

    go build        # build the service
    go run .        # run the service locally
    go test ./...   # run all tests


=== Configuration

The services needs to know what database to connect to and port binding
information for the HTTP service. This is done using the following environment
variables:

    PROCESSOR_DB_CONN      # database connection url, example "postgres://ro_user@localhost:5432/captainslog"
    PROCESSOR_HTTP_LISTEN  # http host/port string, example ":8081"


=== Container

    # Build image with processor binary. Make sure to run this in this
    # directory (<captainslogroot>/processor)
    docker build -t minond/captainslog-processor -f Dockerfile .

    # Run it using local configuration and binding to the correct host and
    # container port Make sure you have a .env file with the required environment
    # variables in the directory where you run this command.
    docker run -d --env-file .env --name cl-processor -p 8081:8081 minond/captainslog-processor

    # Push to container repo.
    docker push minond/captainslog-processor:latest