diff --git a/dev/default.env b/dev/default.env index 7050c54..61bd858 100644 --- a/dev/default.env +++ b/dev/default.env @@ -23,9 +23,10 @@ COMPOSE_PROJECT_NAME= # ENROLLMENT_IMAGE_TAG=override-tag-name # MESSAGING_IMAGE_TAG=override-tag-name # MESSAGINGSERVICE_IMAGE_TAG=override-tag-name +# ISACCML_IMAGE_TAG=override-tag-name # docker-compose development overrides; uncomment to enable -# COMPOSE_FILE=docker-compose.yaml:docker-compose.dev.femr.yaml:docker-compose.dev.fhirwall.yaml:docker-compose.dev.messagingservice.yaml +# COMPOSE_FILE=docker-compose.yaml:docker-compose.dev.femr.yaml:docker-compose.dev.fhirwall.yaml:docker-compose.dev.messagingservice.yaml:docker-compose.dev.isaccml.yaml # uncomment & modify if using above development overrides # FEMR_CHECKOUT_DIR= @@ -33,3 +34,4 @@ COMPOSE_PROJECT_NAME= # ENROLLMENT_CHECKOUT_DIR= # MESSAGING_CHECKOUT_DIR= # MESSAGINGSERVICE_CHECKOUT_DIR= +# ISACCML_CHECKOUT_DIR= diff --git a/dev/docker-compose.dev.isaccml.yaml b/dev/docker-compose.dev.isaccml.yaml new file mode 100644 index 0000000..a6bdd29 --- /dev/null +++ b/dev/docker-compose.dev.isaccml.yaml @@ -0,0 +1,11 @@ +# docker-compose development override for messaging service +--- +version: "3.7" +services: + isaccml: + command: sh -c "cd /opt/app && flask run --host 0.0.0.0 --port ${PORT:-8000}" + environment: + FLASK_ENV: development + volumes: + # set in .env + - "${ISACCML_CHECKOUT_DIR}/:/opt/app" diff --git a/dev/docker-compose.prod.yaml b/dev/docker-compose.prod.yaml index a009b09..e1bf091 100644 --- a/dev/docker-compose.prod.yaml +++ b/dev/docker-compose.prod.yaml @@ -30,3 +30,6 @@ services: messagingservice: restart: unless-stopped + + isaccml: + restart: unless-stopped diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index e56e88a..0f12b82 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -253,9 +253,9 @@ services: FHIR_URL: "http://fhir-internal:8080/fhir/" LOGSERVER_URL: "https://logs.${BASE_DOMAIN:-localtest.me}" TWILIO_WEBHOOK_CALLBACK: "https://messagingservice.${BASE_DOMAIN:-localtest.me}" - # Define location of model to use ML for incoming SMS "urgency" + # Define address hosting the model to use ML for incoming SMS "urgency" # Commented out to avoid filling logs with file not found noise - # TORCH_MODEL_PATH: /opt/app/config/models/model_for_isacc + # ML_SERVICE_ADDRESS: "http://isaccml:8000" ISACC_NOTIFICATION_EMAIL_SENDER_NAME: noreply@femr.${BASE_DOMAIN:-localtest.me} ISACC_SUPPORT_EMAIL: ccstudyteam@uw.edu @@ -276,6 +276,21 @@ services: depends_on: - redis + isaccml: + image: ghcr.io/uwcirg/isacc-ml:${ISACCML_IMAGE_TAG:-main} + environment: + LOGSERVER_URL: "https://logs.${BASE_DOMAIN:-localtest.me}" + # Define path to the model to use ML for incoming SMS "urgency" + # Commented out to avoid filling logs with file not found noise + TORCH_MODEL_PATH: "/opt/app/config/models/model_for_isacc" + + env_file: + - isaccml.env + volumes: + - ./config/messagingservice:/opt/app/config:ro + networks: + - internal + volumes: db-data: {} diff --git a/dev/isaccml.env.default b/dev/isaccml.env.default new file mode 100644 index 0000000..a4fba27 --- /dev/null +++ b/dev/isaccml.env.default @@ -0,0 +1,9 @@ +# Example docker-compose environment file +# Copy to isaccml.env and modify as necessary +# https://docs.docker.com/compose/env-file/ + +# Variables defined in this file will only be available to containers/images +# ie not for interpolation in docker-compose YAML files +SECRET_KEY= + +# TORCH_MODEL_PATH=