-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
40 lines (25 loc) · 1.3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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