Skip to content

Commit

Permalink
fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Jan 17, 2024
1 parent c928408 commit d71086f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 6 additions & 3 deletions infrastructure/setup-deploy-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/api/notification/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit d71086f

Please sign in to comment.