Skip to content

Deployment Process

Jessica Chioma edited this page Jul 21, 2024 · 6 revisions

Deployment Process

DNS Configuration

  1. Configure DNS Records:
    • We set up DNS records for deployment.nextjs.boilerplate.hng.tech, staging.nextjs.boilerplate.hng.tech, and nextjs.boilerplate.hng.tech to point to your server.

Accessing Deployed Projects

  • Development Environment: Accessible at Development
  • Staging Environment: Accessible at Staging
  • Production Environment: Accessible at Production

Ensuring Uptime

The team planned for 99% uptime by utilizing a docker-compose file to spin up two containers for both the development and production environment. Except for the Staging environment, the docker-compose builds one container. During each build, a change pushed to the main branch does not take down the server but keeps the previous running container active until the build completes. The old container is then detached, and the newly created one is used.

NGINX is used for both load balancing and reverse proxying, ensuring that no single container becomes overwhelmed and that requests are efficiently routed to the appropriate containers. This setup helps maintain high availability and performance for the deployed projects.