diff --git a/dev/default.env b/dev/default.env index 3fddcd1..11e3582 100644 --- a/dev/default.env +++ b/dev/default.env @@ -17,3 +17,5 @@ COMPOSE_PROJECT_NAME= #FHIR_IMAGE_TAG= #POSTGRES_IMAGE_TAG= + +#OPENAI_API_KEY= diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index a5e7cb7..7c50989 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -67,7 +67,10 @@ services: - fhir-internal shl-creator: - image: ghcr.io/uwcirg/shl-ips:${SHL_CREATOR_IMAGE_TAG:-latest} + #image: ghcr.io/uwcirg/shl-ips:${SHL_CREATOR_IMAGE_TAG:-latest} + #image: ghcr.io/uwcirg/shl-ips:${SHL_CREATOR_IMAGE_TAG:-ai-chat-experimental} + #image: ghcr.io/uwcirg/shl-ips:${SHL_CREATOR_IMAGE_TAG:-epic-uwmed-prod} + image: ghcr.io/uwcirg/shl-ips:${SHL_CREATOR_IMAGE_TAG:-llm-chat-take-2} environment: VITE_API_BASE: https://shl-server.${BASE_DOMAIN}/api VITE_INTERMEDIATE_FHIR_SERVER_BASE: https://fhir.${BASE_DOMAIN}/fhir/ @@ -103,6 +106,27 @@ services: networks: - ingress + llm-service: + image: ghcr.io/uwcirg/llm-wrap:${LLM_SERVICE_IMAGE_TAG:-latest} + environment: + - OPENAI_API_KEY=${OPENAI_API_KEY} + labels: + - "traefik.enable=true" + - "traefik.http.routers.llm-service-${COMPOSE_PROJECT_NAME}.rule=Host(`llm-service.${BASE_DOMAIN}`)" + - "traefik.http.routers.llm-service-${COMPOSE_PROJECT_NAME}.entrypoints=websecure" + - "traefik.http.routers.llm-service-${COMPOSE_PROJECT_NAME}.tls=true" + - "traefik.http.routers.llm-service-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt" + # add CORS middleware, configured to return `Access-Control-Allow-Origin: *` + # NB accessControlAllowOrigin is deprecated, but not noted in docs + # https://github.com/traefik/traefik/issues/8796 + - "traefik.http.middlewares.llm-service-${COMPOSE_PROJECT_NAME}-cors.headers.accessControlAllowOriginList=*" + - "traefik.http.middlewares.llm-service-${COMPOSE_PROJECT_NAME}-cors.headers.accessControlAllowMethods=HEAD,GET,OPTIONS,PATCH,POST,PUT,DELETE" + - "traefik.http.middlewares.llm-service-${COMPOSE_PROJECT_NAME}-cors.headers.accessControlAllowHeaders=Authorization,Origin,Content-Type,Accept" + - "traefik.http.routers.llm-service-${COMPOSE_PROJECT_NAME}.middlewares=llm-service-${COMPOSE_PROJECT_NAME}-cors" + - "traefik.http.services.llm-service-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=5000" + networks: + - ingress + volumes: db-data: {} shl-server-data: {}