To deploy the application locally using Docker Compose, follow these steps:
-
Install Docker and Docker Compose on your local machine (If you have Docker Desktop installed on your machine, you already have Docker and Docker Compose installed and accessible via the command line interface.)
-
Navigate to the root directory of the application.
-
Open the terminal and run the following command to start the application:
docker-compose up --build
-
The application will be deployed locally and accessible at
http://localhost:3000
which is the default port for the frontend application. The backend application will be accessible athttp://localhost:8000
.
To deploy the application on the cloud using GKE, follow these steps:
-
Navigate to the root directory of the application.
-
Run the workflow/gh action
.yml
files in the following order:manual-terraform.yml
which uses the terraform files from/cloud-infra
dir to provision the infrastructure (gke cluster) on GCP.docker.yml
which builds the frontend & backend Docker image for the application and pushes it to the artifact registry on gcp.kubernetes.yml
which creates a kubernetes deployment and service for the application on GKE using the files in/cloud-infra/k8s
dir.
-
The application will be deployed (might take same time for the status to turn green) on GKE and accessible through the external IP provided by the Load Balancer service.
-
Go to link and scroll down to view the external IP of the Load Balancer service. (see image below 👇)
Please note that it will take some time for the application to be fully functional. If you see any errors, try refreshing the page after some time. you might have to setup some gcloud configurations to get this to work.