MLR Service to Email Processing Result Notifications to Users
Copy the application-test.yml file from the project root directory to an "application.yml" file also at the project root directory and change the values as needed. Open a terminal and cd to the project root directory. Within this directory run
mvn spring-boot:run
and then the application will launch and be available at http://localhost:8080/swagger-ui.html
This docker image is designed to be used with Docker Swarm and as such it uses Docker Secrets for passing in configuration.
The docker image is built using a jar version that has been uploaded to the CIDA artifactory. The artifact version needs to be provided as follows:
% docker build --mlr-version=0.1-SNAPSHOT .
On the docker manager of your swarm you can create the service to run this application by running a command such as (where mlr_notification
is the name of the built image):
docker service create --name mlrnotification --publish 8080:8080 --secret source=mlr_email_config,target=application.yml --env MLR_NOTIFICATION_EMAIL_FROM="[email protected]" --env MLR_NOTIFICATION_EMAIL_TEXT="Hello" --env MLR_NOTIFICATION_EMAIL_HOST=localhost --env MLR_NOTIFICATION_EMAIL_PORT=25 --env MLR_NOTIFICATION_SERVICE_PWD="test"
-
MLR_NOTIFICATION_EMAIL_FROM - The email address to send emails from this service as. I.E: The
from
address for emails generated by this service. -
MLR_NOTIFICATION_EMAIL_HOST - The host address of the smtp server to connect to
-
MLR_NOTIFICATION_EMAIL_PORT - The port of the smtp server to connect to
-
MLR_NOTIFICATION_SERVICE_PWD - The default user account password