Skip to content

Commit

Permalink
(state-transitions): remove openhim url and modify confirm registrati…
Browse files Browse the repository at this point in the history
…on url (#932)

* Remove openhim url and modify confirm registration url

* Remove openhim core and openhim console services
  • Loading branch information
Nil20 authored Mar 13, 2024
1 parent 6113e61 commit 192a493
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 92 deletions.
53 changes: 0 additions & 53 deletions infrastructure/docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -928,59 +928,6 @@ services:
options:
gelf-address: 'udp://127.0.0.1:12201'
tag: 'hearth'
openhim-core:
environment:
- mongo_url=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1/openhim-dev?replicaSet=rs0
- mongo_atnaUrl=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1/openhim-dev?replicaSet=rs0
depends_on:
- mongo1
deploy:
labels:
- 'traefik.enable=false'

# To expose OpenHIM to external systems as an interoperability layer
# Given OpenCRVS has it's own integrations UI and control. This functionality is currently disabled
# If you wish to reopen OpenHIM interoperability, you can enable these lines
# Any subdomain labelled "api" is regularly spammed and can lead to DDOS attack
# Care must be taken to whitelist any access to this endpoint

# - 'traefik.http.routers.api.rule=Host(`api.{{hostname}}`)'
# - 'traefik.http.routers.api.tls=true'
# - 'traefik.http.routers.api.service=api'
# - 'traefik.http.routers.api.tls.certresolver=certResolver'
# - 'traefik.http.routers.api.entrypoints=web,websecure'
# - 'traefik.http.services.api.loadbalancer.server.port=5001'
# - 'traefik.http.middlewares.openhimapi-whitelist.ipwhitelist.sourcerange=<Comma separated IP list>'
# - "traefik.http.routers.openhimapi.middlewares=openhimapi-whitelist@docker"

- 'traefik.docker.network=opencrvs_overlay_net'

- 'traefik.http.middlewares.openhimcore.headers.stsseconds=31536000'
- 'traefik.http.middlewares.openhimcore.headers.stsincludesubdomains=true'
- 'traefik.http.middlewares.openhimcore.headers.stspreload=true'
replicas: 1
networks:
- overlay_net
logging:
driver: gelf
options:
gelf-address: 'udp://127.0.0.1:12201'
tag: 'openhim-core'
openhim-console:
deploy:
labels:
- 'traefik.enable=false'
replicas: 1
configs:
- source: openhim-console-conf.{{ts}}
target: /usr/share/nginx/html/config/default.json
networks:
- overlay_net
logging:
driver: gelf
options:
gelf-address: 'udp://127.0.0.1:12201'
tag: 'openhim-console'

webhooks:
secrets:
Expand Down
3 changes: 1 addition & 2 deletions infrastructure/docker-compose.development-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ services:
- FHIR_URL=http://hearth:3447/fhir
- AUTH_URL=http://auth:4040
- APPLICATION_CONFIG_URL=http://config:2021
- OPENHIM_URL=http://openhim-core:5001/fhir
- CONFIRM_REGISTRATION_URL=http://openhim-core:5001/confirm/registration
- CONFIRM_REGISTRATION_URL=http://workflow:5050/confirm/registration
- CHECK_INVALID_TOKEN=true
- MONGO_URL=mongodb://mongo1/user-mgnt?replicaSet=rs0
- SENTRY_DSN=${SENTRY_DSN}
Expand Down
17 changes: 1 addition & 16 deletions infrastructure/docker-compose.production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ services:
- FHIR_URL=http://hearth:3447/fhir
- AUTH_URL=http://auth:4040
- APPLICATION_CONFIG_URL=http://config:2021
- OPENHIM_URL=http://openhim-core:5001/fhir
- CONFIRM_REGISTRATION_URL=http://openhim-core:5001/confirm/registration
- CONFIRM_REGISTRATION_URL=http://workflow:5050/confirm/registration
- CHECK_INVALID_TOKEN=true
- SENTRY_DSN=${SENTRY_DSN}
- SENDER_EMAIL_ADDRESS=${SENDER_EMAIL_ADDRESS}
Expand Down Expand Up @@ -163,20 +162,6 @@ services:
- mongo1
- mongo2

openhim-core:
environment:
- mongo_url=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1,mongo2/openhim-dev?replicaSet=rs0
- mongo_atnaUrl=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1,mongo2/openhim-dev?replicaSet=rs0
depends_on:
- mongo1
- mongo2
deploy:
replicas: 2

openhim-console:
deploy:
replicas: 2

mongo2:
image: mongo:4.4
hostname: 'mongo2'
Expand Down
3 changes: 1 addition & 2 deletions infrastructure/docker-compose.qa-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ services:
- FHIR_URL=http://hearth:3447/fhir
- AUTH_URL=http://auth:4040
- APPLICATION_CONFIG_URL=http://config:2021
- OPENHIM_URL=http://openhim-core:5001/fhir
- CONFIRM_REGISTRATION_URL=http://openhim-core:5001/confirm/registration
- CONFIRM_REGISTRATION_URL=http://workflow:5050/confirm/registration
- CHECK_INVALID_TOKEN=true
- MONGO_URL=mongodb://mongo1/user-mgnt?replicaSet=rs0
- SENTRY_DSN=${SENTRY_DSN}
Expand Down
17 changes: 1 addition & 16 deletions infrastructure/docker-compose.staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ services:
- FHIR_URL=http://hearth:3447/fhir
- AUTH_URL=http://auth:4040
- APPLICATION_CONFIG_URL=http://config:2021
- OPENHIM_URL=http://openhim-core:5001/fhir
- CONFIRM_REGISTRATION_URL=http://openhim-core:5001/confirm/registration
- CONFIRM_REGISTRATION_URL=http://workflow:5050/confirm/registration
- CHECK_INVALID_TOKEN=true
- SENTRY_DSN=${SENTRY_DSN}
- SENDER_EMAIL_ADDRESS=${SENDER_EMAIL_ADDRESS}
Expand Down Expand Up @@ -160,20 +159,6 @@ services:
- WAIT_HOSTS=mongo1:27017,influxdb:8086,minio:9000,elasticsearch:9200
depends_on:
- mongo1

openhim-core:
environment:
- mongo_url=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1/openhim-dev?replicaSet=rs0
- mongo_atnaUrl=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1/openhim-dev?replicaSet=rs0
depends_on:
- mongo1
deploy:
replicas: 1

openhim-console:
deploy:
replicas: 1

mongo-on-update:
depends_on:
- mongo1
Expand Down
4 changes: 1 addition & 3 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export const LOGIN_URL = process.env.LOGIN_URL || 'http://localhost:3020/'
export const CLIENT_APP_URL =
process.env.CLIENT_APP_URL || 'http://localhost:3000/'
export const FHIR_URL = process.env.FHIR_URL || 'http://localhost:3447/fhir'
export const OPENHIM_URL =
process.env.OPENHIM_URL || 'http://localhost:5001/fhir'
export const ORG_URL = 'http://opencrvs.org'
export const COUNTRY_CONFIG_HOST = process.env.COUNTRY_CONFIG_HOST || '0.0.0.0'
export const COUNTRY_CONFIG_PORT = process.env.COUNTRY_CONFIG_PORT || 3040
Expand All @@ -31,7 +29,7 @@ export const SENTRY_DSN = process.env.SENTRY_DSN
export const CHECK_INVALID_TOKEN = process.env.CHECK_INVALID_TOKEN || 'false'
export const CONFIRM_REGISTRATION_URL =
process.env.CONFIRM_REGISTRATION_URL ||
'http://localhost:5001/confirm/registration'
'http://localhost:5050/confirm/registration'
export const DEFAULT_TIMEOUT = 600000
export const PRODUCTION = process.env.NODE_ENV === 'production'
export const QA_ENV = process.env.QA_ENV || false

0 comments on commit 192a493

Please sign in to comment.