Update app for Cloud deployment on Heroku
Closed this issue · 3 comments
The original local server running this website is to be decommissioned, and we would like to move the hosting of this webapp to the Cloud alongside most of LCO's other services.
Before this can happen a number of substantial upgrades are required:
- Update code and environment from Python 2 -> Python 3
- Update Django from v1.14 to v4.03
- Change database from SQLite3 to PostgreSQL
The website content is also out of date in places and needs revision. The above changes are necessary in order to be able to implement future content.
Codebase has been updated for Python 3.9.5 and Django 4.0.3.
I rebuilt the database in PostgreSQL from scratch, and took the opportunity to review the website contents and update as necessary. To make the deployment process easier, I have fully updated the content ingest software as well.
I chose Heroku as the Cloud deployment platform, based on previous experience of easily deploying Django apps that way.
Website is now up and running on that platform.
I've updated the sites DNS server to point to the Heroku container, configuring a CNAME for www.microlensing-source.org as well as a redirect for http://microlensing-source.org. I've paid for an SSL certification through Heroku's management system.
Unfortunately this has revealed an issue, described in detail here.
For users to navigate to the site via the root domain, microlensing-source.org would require the use of ALIAS DNS records, since A records do not work with Heroku hosting. Our current DNS host does not support ALIAS records.
At the present time, the website has been successfully upgraded and migrated to the Cloud, and can be found at:
https://www.microlensing-source.org.
So this issue is resolved, and I will explore alternative hosting/DNS options separately.