Domain Name Migration
Ticket #89: Project Migration to the justingoufo.com Domain
Type: Infrastructure Operation / Strategic Maintenance
Affected Component: DNS configuration, Nginx configuration (VPS), Project configuration (mkdocs.yml), Application templates (demo_index.html)
Objective: To update the entire "Augmented Financial Analyst" project, making both the application and its documentation accessible via the new, secure addresses https://invest.justingoufo.com and https://docs.invest.justingoufo.com.
1. Actions Performed
To achieve this objective, a series of modifications were carried out across three distinct infrastructure layers: the Domain Name System (DNS) configuration, the web server (Nginx) configuration, and the project's source code.
At the DNS Level (at Namecheap):
* A records for the subdomains invest and docs.invest were created and configured to point to the correct IP address of the VPS server.
At the VPS Server Level (at Hostinger):
* Nginx Configuration: The Nginx configuration files were renamed and updated to handle requests for the new domains. The reverse proxy logic was confirmed to correctly forward traffic from invest.justingoufo.com to the Dockerized application.
* Security (HTTPS): The Certbot tool was used to generate and install SSL/TLS certificates for both new domains, enabling encryption and automatic redirection from HTTP to HTTPS.
At the Project Code Level (GitHub Repository):
* MkDocs Configuration: The mkdocs.yml file was updated with the new site_url (https://docs.invest.justingoufo.com) to ensure all internal links within the documentation site are correct.
* Application Templates: The link to the documentation within the demo_index.html template was updated to point to the new URL.
* Deployment Pipeline (CI/CD): The deploy-docs.yml workflow was adjusted to ensure that the SCP file transfer targets the correct directory on the server, matching the new Nginx configuration.
2. Challenges Encountered and Resolution
The migration presented one primary challenge related to the DNS configuration, which had to be resolved before other steps could succeed.
- Challenge: During the initial attempt to secure the domain with Certbot, the process failed with a
404 Unauthorizederror. - Root Cause: The investigation revealed that the DNS records for
invest.justingoufo.comwere pointing to an incorrect and obsolete IP address. This prevented the Let's Encrypt validation servers from reaching the correct VPS. - Resolution: The issue was resolved by logging into the Namecheap DNS management interface and correcting the faulty
Arecord. Once this change had propagated across the internet, the Certbot validation was able to complete successfully.
3. Final Outcome
The migration is a complete success. The application and its documentation are now served securely from their new, dedicated URLs. All configurations, from DNS to the application code, are now aligned, and the automated deployment pipelines are fully functional with the new architecture.