DEV Community

Cover image for DO Hackathon: Devops Architecture
Dennis Krasnov
Dennis Krasnov

Posted on

DO Hackathon: Devops Architecture

Once we have a portfolio website ready, we need to host it to make it publicly accessible on the web. Devops, among other things, is the automated process of pushing code onto production hosting.

In this article, I will cover two ways (out of many) to do hosting and devops for a static website.

Method 1 - DigitalOcean Managed Kubernetes

This version of the website is currently hosted at krasnov.dev.

Steps:

  1. Setup a Kubernetes cluster and container registry
  2. Apply Kubernetes deployments, services, ingresses, etc.
  3. Commit and push code
  4. Within a CI/CD tool:
    1. Build an OCI image
    2. Push the image to a container registry
    3. Update the Kubernetes cluster to use the new image

Alt Text

notes:

  • Much harder than it looks, Kubernetes is notoriously complex
  • It takes a minimum of $10/month for a single node and $10/month for a load balancer on DigitalOcean
  • Kubernetes can be used to host just about anything, it's amazing if you're planning to host many other applications

Method 2 - DigitalOcean App Platform

This version of my portfolio is currently hosted at denniskrasnov.com.

Steps:

  1. Hook up App Platform (starter variant) to GitHub
  2. Tell it how to build
  3. Tell it which output folder to use
  4. Commit and push code

OR

Deploy to DO

Just click the button to get started.

Alt Text

notes:

  • This is about as simple as it gets, definitively does "Get apps to market faster" as promised
  • You can host 3 sites for free, then at $3/month for more, not bad for what you get
  • App Platform also supports hosting services and databases, which is enough for most use cases

Conclusion

That covers the two ways that I've hosted my portfolio. Between the two, DigitalOcean App Platform is by far the easier option.

Next up, I will benchmark both these deployment options.

Top comments (0)