DEV Community

Javeed Ishaq
Javeed Ishaq

Posted on

Hosting Options for a Full-Stack Project with Spring Boot, PostgreSQL, and Angular

If you’ve developed a full-stack project using Spring Boot, PostgreSQL, and Angular, finding the right hosting solution is the next step. While AWS is a popular choice, there are several alternatives—both free and affordable—to host your project. Here are some of the best options to consider:


Free Hosting Options

1. Render (https://render.com/)

  • What it offers:
    • Free tier for web services (suitable for hosting the Spring Boot backend).
    • Free tier for PostgreSQL database (up to 1GB storage).
    • Static hosting for your Angular frontend.
  • How to use:
    • Deploy your Spring Boot application as a web service.
    • Use Render’s free PostgreSQL instance for your database.
    • Host your Angular app as a static site.

2. Railway (https://railway.app/)

  • What it offers:
    • Free hosting with $5 worth of monthly usage (approximately 500 hours of server time and database usage).
    • PostgreSQL hosting with 500MB free storage.
  • How to use:
    • Deploy your Spring Boot backend using Docker or directly via GitHub.
    • Use Railway’s PostgreSQL service for the database.
    • Host the Angular frontend using its static site hosting or connect it to another static hosting service.

3. Vercel (https://vercel.com/)

  • What it offers:
    • Free tier for static frontend hosting, which is ideal for Angular apps.
    • No backend hosting, but it integrates seamlessly with platforms like Render or Railway.
  • How to use:
    • Deploy your Angular frontend on Vercel.
    • Connect the frontend to a backend hosted on Render or Railway.

4. Fly.io (https://fly.io/)

  • What it offers:
    • Free tier for deploying Dockerized apps, suitable for hosting the Spring Boot backend.
    • Free PostgreSQL instance for lightweight usage.
  • How to use:
    • Containerize your Spring Boot app and deploy it on Fly.io.
    • Use Fly.io’s PostgreSQL service for the database.
    • Host the Angular frontend separately (e.g., on Vercel or Netlify).

5. Heroku (https://heroku.com/)

  • What it offers:
    • Free tier with 550-1,000 dyno hours per month for hosting apps.
    • Free PostgreSQL database (up to 1GB).
    • Note: Free apps may sleep after periods of inactivity.
  • How to use:
    • Deploy your Spring Boot backend as a web app.
    • Use Heroku’s PostgreSQL database service.
    • Host the Angular frontend on Netlify or Vercel.

6. Netlify (https://www.netlify.com/)

  • What it offers:
    • Free static hosting for Angular frontend applications.
    • No backend or database hosting is included.
  • How to use:
    • Deploy your Angular app on Netlify.
    • Use another service (e.g., Render or Railway) to host your backend and database.

Affordable Paid Alternatives

1. DigitalOcean (https://www.digitalocean.com/)

  • What it offers:
    • Managed Kubernetes, droplets (virtual servers), and managed databases.
    • Pricing starts at $5/month for a virtual server and $15/month for managed PostgreSQL.
  • How to use:
    • Host your Spring Boot backend on a droplet.
    • Use their managed PostgreSQL for your database.
    • Host Angular on a droplet or pair it with Netlify/Vercel.

2. Linode (https://www.linode.com/)

  • What it offers:
    • Affordable cloud hosting, similar to DigitalOcean.
    • Pricing starts at $5/month for virtual servers.
  • How to use:
    • Deploy your backend and database on a Linode server.
    • Host the frontend on Netlify or Vercel.

3. Google Cloud Platform (GCP) (https://cloud.google.com/)

  • What it offers:
    • Free tier includes 1 f1-micro VM instance per month (suitable for low-traffic Spring Boot apps).
    • Free $300 credits for 90 days.
  • How to use:
    • Use the free VM instance to host your backend and database.
    • Deploy Angular on Netlify or Vercel.

4. Microsoft Azure (https://azure.microsoft.com/)

  • What it offers:
    • Free tier includes 1 B1S virtual machine for 12 months.
    • Free database services for 12 months (with limited capacity).
  • How to use:
    • Host your backend and database on Azure’s free VM.
    • Use a static hosting service for Angular.

Recommendations

For a completely free setup:

  • Backend and Database: Use Render or Railway.
  • Frontend: Use Netlify or Vercel for hosting your Angular app.

For a low-cost, reliable setup:

  • Use DigitalOcean or Linode to host your backend, database, and frontend.

These options provide flexibility, scalability, and a balance between free and affordable hosting solutions for your project. Let me know if you need detailed deployment instructions for any platform!

Top comments (0)