Hi,
Are there guidelines we can follow to change the domain name of a deployed instance?
Thanks,
#it4life @Rodolphe
Hi,
Are there guidelines we can follow to change the domain name of a deployed instance?
Thanks,
#it4life @Rodolphe
We have changed the domain name and server email of our commcare application by doing the following:
After all this, the new domain name is working and has a valid SSL certificate, but we have some issues.
Does we miss something to properly change the domain name ?
Sound like some cache issue ?
Thanks for help.
You probably also need to update the Django site which can be done via the Django admin panel:
https://[your domain]/admin/sites/site/
or a Django shell:
from django.contrib.sites.models import Site
site = Site.objects.all()[0]
print(site) # confirm it's still references the old domain
site.domain = 'new domain'
site.save()
Thanks @Simon_Kelly. We had already updated the site via the Django Admin panel.
There's also this issue where the link generated for the QR code of an app is still using the old domain name (si-imyeta.gret.org), while the url of the page itself is using the new one (commcare.gret.org).
I was wondering if we had to update additional config files or execute another ansible task to propagate the domain name change further?
Thanks,
I don't think clearing the cache would make any difference.
The app URLs are generated based on the BASE_ADDRESS
setting so you could check that to make sure it's correct. You should also make sure you haven't configured a custom base URL for the app (in advanced app settings).
Thanks @Simon_Kelly.
The BASE_ADDRESS is good. We did not activate the feature flag that allows to change the base URL, so it's unchanged.
Any other ideas?
@guillaume you may need to make a new build in order to update the URL in the build artifacts.
Also, doing this sort of transition with active users can be a bit tricky, especially if rolling out a new app version takes time. I'd recommend reviewing these docs for ideas, particularly Section 1, "Switch mobile devices to a proxy URL"
https://commcare-cloud.readthedocs.io/en/latest/installation/migration/1-migrating-project.html
Most of that document shouldn't be relevant to this use-case, but part of it deals with managing a domain name transition with active mobile workers who already have the app deployed. Setting a custom base URL might be helpful, as would using the DATA_MIGRATION
to temporarily bring down mobile endpoints.