Startec

Startec

How to Deploy a Three tier web application in 2 different ways

Mai 25, às 18:44

·

3 min de leitura

·

1 leituras

A three-tier web application is one that has a frontend user interface, a backend interface, and a database layer. It is a very common practice to host applications as three-tier applications. A three-tier...
How to Deploy a Three tier web application in 2 different ways

Ayomide

A three-tier web application is one that has a frontend user interface, a backend interface, and a database layer. It is a very common practice to host applications as three-tier applications. A three-tier web application leverages the use of microservices. Microservices are abstractions of your project into different layers. They are smaller pieces of the big puzzle that is your application.

An advantage of microservices that makes them a crowd favorite is that it helps keeps the different parts of your application isolated from each other. This means that a problem with your frontend interface will not affect the backend interface and vice versa.

One of the ways we will be exploring to deploy our application is the use of a deploy script, a virtual machine, an SSL certificate, and domain name routing.

First, we would need to create and virtual machine and connect to it. In the machine, we would clone the GitHub repository for the project and we would be installing Nginx in the VM.

Image description
Image description
We would need to edit our Nginx configuration file to allow our application to be served by our domain name. Don't forget to make sure your webserver can send HTTP and HTTPS traffic in your security group rules

Image description

Go to your domain name registrar and route your domain name to point to the IP address of your web server.

Image description
Install an SSL certificate for your domain name.

Image description
Run the deploy script. Your application should be running and accessible through your domain name

Image description

Alternatively, we can also deploy our application with the use of a virtual machine, docker images, and domain name routing

First, we would create a virtual machine and connect to it.
We would first install docker in the virtual machine(VM).

Image description

We would clone our Github repository into our VM.
Image description
As the dockerfiles and the docker-compose file for the applications are already in the repository, all we have to do is run docker compose up
Image description
Next, we would point our domain name to route to the IP address of our web server and install our SSL certificate. This will automatically update our nginx configuration file
Image description

Check your domain name to confirm that the SSL certificate is properly installed
Image description

Lastly, don't forget to delete and clean up all the resources you created using any of the methods to avoid unnecessary charges


Continue lendo

DEV

Introduction to React.js
Introduction React is a popular open source javascript framework that uses components. React was created by a software engineer at Facebook named Jordan Walke. As react gained popularity over the years, it...

Mai 28, às 23:49

TabNews

Poderiam dar um conselho para um jovem de 16 anos que quer ser um programador · Higordacosta
Fala turma !!! tenho 16 anos e estou começando na programaçao agora faz mais ou menos (10 ou 11) meses que programo começei em python e fiquei uns 3 ou 4 meses na linguagem e dps fui para...

Mai 28, às 23:48

TabNews

[Duvida]Como as empresas crescem? · CristRodsz
Ja faz um tempo que eu venho me perguntando como que as empresas fazem pra aumentar seu alcance, como por exemplo, como as pessoas encontram startups que acabaram de nascer, um exemplo qu...

Mai 28, às 23:40

TabNews

[HELP ME] Alguém com esperiência em chat bot inteligente? · marcuth
Quero criar uma AI de texto especializada! Tenho várias páginas HTML que eu coletei no passado de um fórum de um jogo e, gostaria de criar um modelo de inteligência artificial à partir do...

Mai 28, às 23:25

TabNews

Hospede seu projeto de graça! · marcuth
Hospedar projetos gratuitamente (sem precisar colocar dados de cartão): Hoje resolvi tirar um tempo para procurar hospedagem gratuitas para projetos, até porque às vezes, nem eu lembro de...

Mai 28, às 22:57

Discovery

Google celebra 90º aniversário de Abdul Rahman Munif com Doodle
O Google, em homenagem ao escritor, jornalista e crítico cultural Abdul Rahman Munif, celebra seu 90º aniversário com um Doodle hoje. Nascido em Amã, Jordânia, em 1933, Munif mudou-se para o Iraque em 1952...

Mai 28, às 22:52

Hacker News

Profit-Obsessed Private Equity Is Now Dominating the US Hospice System
The US hospice system is supposed to provide compassionate end-of-life care. But private equity firms have swallowed up the industry: 7 out of 10 hospice agencies are now for-profit, putting profit maximization over patient well-being.

Mai 28, às 21:55

Hacker News

Functional Programming in Lean - Functional Programming in Lean
Functional Programming in Lean Functional Programming in Lean by David Thrane Christiansen Copyright Microsoft Corporation 2023 This is a free book on using Lean 4 as a programming language. All code...

Mai 28, às 21:08

DEV

Part 1: Getting Started with Vue
You will learn about vue fundamentals and also learn how they work in this article, If you have difficulties understanding any concept explained here, kindly refer to the documentation.  What is vue js and...

Mai 28, às 20:57

Hacker News

Console #159 -- Interview with Alessandro of MediaMTX: Zero-dependency server for live video and audio streams
This space is reserved for sponsors that support us to keep the newsletter going! Want to support Console? Send us a note at [email protected] through open source projects on OpenSourceHub.io, add your...

Mai 28, às 20:47