diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 15f04ad3a..a1c3df56e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -148,6 +148,7 @@ jobs: env: DOMAIN: ${{ vars.DOMAIN }} REPLICAS: ${{ vars.REPLICAS }} + NOTIFICATION_TRANSPORT: ${{ vars.NOTIFICATION_TRANSPORT }} SMTP_PORT: ${{ secrets.SMTP_PORT }} SMTP_HOST: ${{ secrets.SMTP_HOST }} SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }} diff --git a/infrastructure/deployment/deploy.sh b/infrastructure/deployment/deploy.sh index 2d522d821..2e815bfe3 100755 --- a/infrastructure/deployment/deploy.sh +++ b/infrastructure/deployment/deploy.sh @@ -353,7 +353,7 @@ EOF configured_ssh " MINIO_ROOT_USER=$MINIO_ROOT_USER MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD - /opt/opencrvs/infrastructure/setup-deploy-config.sh | tee -a $LOG_LOCATION/setup-deploy-config.log" + /opt/opencrvs/infrastructure/setup-deploy-config.sh $HOST | tee -a $LOG_LOCATION/setup-deploy-config.log" rotate_secrets diff --git a/infrastructure/setup-deploy-config.sh b/infrastructure/setup-deploy-config.sh index 45305ed05..f9d8bacfd 100755 --- a/infrastructure/setup-deploy-config.sh +++ b/infrastructure/setup-deploy-config.sh @@ -8,15 +8,18 @@ # Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS. set -e echo -echo "Setting up deployment config for $1 - `date --iso-8601=ns`" + +HOST=$1 + +echo "Setting up deployment config for $HOST - `date --iso-8601=ns`" # Set hostname in openhim-console config -sed -i "s/{{hostname}}/$1/g" /opt/opencrvs/infrastructure/openhim-console-config.deploy.json +sed -i "s/{{hostname}}/$HOST/g" /opt/opencrvs/infrastructure/openhim-console-config.deploy.json # Set hostname in compose file for file in /opt/opencrvs/infrastructure/docker-compose*.yml; do - sed -i "s/{{hostname}}/$1/g" "$file" + sed -i "s/{{hostname}}/$HOST/g" "$file" done # Setup an encryption key for Kibana diff --git a/src/api/notification/handler.ts b/src/api/notification/handler.ts index f43322993..f63905a9d 100644 --- a/src/api/notification/handler.ts +++ b/src/api/notification/handler.ts @@ -150,7 +150,6 @@ export async function emailHandler( h: Hapi.ResponseToolkit ) { const payload = request.payload as EmailPayloads - console.log({ payload }) if (process.env.NODE_ENV !== 'production') { logger.info( diff --git a/src/index.ts b/src/index.ts index aed649817..c6bdaa7f3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -459,6 +459,10 @@ export async function createServer() { path: '/email', handler: emailHandler, options: { + /* + * In deployed environments, the email path is blocked by Traefik. + * See docker-compose.deploy.yml for more details. + */ auth: false, tags: ['api'], validate: {