Skip to content

Latest commit

 

History

History
78 lines (49 loc) · 2.99 KB

setup-all.md

File metadata and controls

78 lines (49 loc) · 2.99 KB

Full System Setup Guide

Cloud setup steps

  1. Create a google cloud project and note down the project id

  2. Follow the database setup guide and note down the database credentials

  3. Follow the image storage bucket setup guide and note down the bucket url

  4. Follow the image function setup guide and note down the image function url

  5. Follow the microservices setup guide and note down the created service urls

  6. Follow the API gateway setup guide and note down the api gateway vm ip address

  7. Follow the frontend VM setup guide

  8. Follow the frontend VM load balancer setup guide and note down the load balancer IP address

  9. Follow the load generator setup guide and run tests by hitting the load balancer and API Gateway VM IP addresses

  10. Follow the stress test guide to see how to run tests

Local setup with Docker Compose

  1. Create a Google Cloud project and note down the project name

  2. Setup the image storage bucket, note down the bucket name and obtain the service account credentials

  3. Setup the image function and note down the function url

  4. Create an .env.local file in each microservice source directory

Add the following to the .env.local files inside auth-service, mono-service and recommendation-service

DB_NAME=ovatify
DB_USER=postgres
DB_PASSWORD=Test123.
DB_HOST=host.docker.internal

Add the following to the env.local file inside user-service

DB_NAME=ovatify
DB_USER=postgres
DB_PASSWORD=Test123.
DB_HOST=host.docker.internal
CLOUD_FUNCTION_URL=your-function-url-here
STORAGE_BUCKET_NAME=your-bucket-name-here
PROJECT_ID=your-project-id-here

Rename the service account file to credentials.json and place it in the root directory of user-service

  1. Create an .env file in frontend/ovatify-frontend

Add the following to the .env file

PUBLIC_BASE_URL=http://localhost:8000
  1. Run
docker compose up --remove-orphans --detach
  1. Once the services are up and running, connect to the database and restore the backup
psql -U postgres -d ovatify -f backend/database/backup.sql
  1. In your browser, navigate to http://localhost:5000/ for the frontend app or http://localhost:7000/ for the load generator