diff --git a/CHANGELOG.md b/CHANGELOG.md index f6067dd170..09e47a0ddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 2.0.0 + +### Breaking changes + +- Switch to docker.io/chumaky/postgres_mongo_fdw:17.6_fdw5.5.2 image to support `mongo_fdw`. This is required for the legacy user migrations to work. It will be switched back to the official postgres image in a future release. +- A new service `legacy-user-migration` which runs the same migration image but with the `migrate-legacy-users` flag and with the following new environment variables: + - EVENTS_SUPERUSER_POSTGRES_URL + - MONGO_HOST + - MONGO_PORT + - MONGO_USERNAME + - MONGO_PASSWORD + - MONGO_REPLICA_SET + +The default values for these variables have been added to the `docker-compose.deploy.yml` file. They should work out of the box for most deployments, but please ensure to set them correctly if you have a custom MongoDB setup. + ## 1.9.1 ### Breaking changes diff --git a/infrastructure/docker-compose.deploy.yml b/infrastructure/docker-compose.deploy.yml index 5c040cec0f..27ef392f8d 100644 --- a/infrastructure/docker-compose.deploy.yml +++ b/infrastructure/docker-compose.deploy.yml @@ -913,6 +913,7 @@ services: options: gelf-address: 'udp://127.0.0.1:12201' tag: 'config' + migration: environment: - USER_MGNT_MONGO_URL=mongodb://user-mgnt:${USER_MGNT_MONGODB_PASSWORD}@mongo1/user-mgnt?replicaSet=rs0 @@ -942,6 +943,49 @@ services: options: gelf-address: 'udp://127.0.0.1:12201' tag: 'migration' + + legacy-user-migration: + image: ghcr.io/opencrvs/ocrvs-migration:${VERSION} + command: ["/bin/sh", "-c", "/app/wait && yarn start:prod --migrate-legacy-users"] + environment: + - USER_MGNT_MONGO_URL=mongodb://user-mgnt:${USER_MGNT_MONGODB_PASSWORD}@mongo1/user-mgnt?replicaSet=rs0 + - DASHBOARD_MONGO_URL=mongodb://performance:${PERFORMANCE_MONGODB_PASSWORD}@mongo1/performance?replicaSet=rs0 + - APPLICATION_CONFIG_MONGO_URL=mongodb://config:${CONFIG_MONGODB_PASSWORD}@mongo1/application-config?replicaSet=rs0 + - HEARTH_MONGO_URL=mongodb://hearth:${HEARTH_MONGODB_PASSWORD}@mongo1/hearth-dev?replicaSet=rs0 + - EVENTS_MONGO_URL=mongodb://events:${EVENTS_MONGODB_PASSWORD}@mongo1/events?replicaSet=rs0 + - OPENHIM_MONGO_URL=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1/openhim-dev?replicaSet=rs0 + - EVENTS_POSTGRES_URL=postgres://events_migrator:${EVENTS_MIGRATOR_POSTGRES_PASSWORD}@postgres/events + - EVENTS_SUPERUSER_POSTGRES_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/events + - SEARCH_URL=http://search:9090/ + - ES_HOST=search-user:${ROTATING_SEARCH_ELASTIC_PASSWORD}@elasticsearch:9200 + - INFLUX_HOST=influxdb + - INFLUX_PORT=8086 + - INFLUX_DB=ocrvs + - WAIT_HOSTS=mongo1:27017,influxdb:8086,minio:9000,elasticsearch:9200 + - MINIO_ACCESS_KEY=${MINIO_ROOT_USER} + - MINIO_SECRET_KEY=${MINIO_ROOT_PASSWORD} + - MINIO_HOST=minio + - MINIO_PORT=9000 + - MINIO_BUCKET=ocrvs + - SUPER_USER_PASSWORD=${SUPER_USER_PASSWORD} + - MONGO_HOST=mongo1 + - MONGO_PORT=27017 + - MONGO_USERNAME=${MONGODB_ADMIN_USER} + - MONGO_PASSWORD=${MONGODB_ADMIN_PASSWORD} + - MONGO_REPLICA_SET=rs0 + deploy: + labels: + - 'traefik.enable=false' + replicas: 1 + restart_policy: + condition: on-failure + networks: + - overlay_net + logging: + driver: gelf + options: + gelf-address: 'udp://127.0.0.1:12201' + tag: 'legacy-user-migration' # Configure other dependencies with deployment specifc details hearth: environment: @@ -967,7 +1011,7 @@ services: tag: 'hearth' postgres: - image: postgres:17.6 + image: docker.io/chumaky/postgres_mongo_fdw:17.6_fdw5.5.2 networks: - overlay_net restart: unless-stopped