Skip to content

Weather Radar Project Setup

Sumedh Salvi edited this page Feb 10, 2022 · 10 revisions

PROJECT SETUP:

Please make sure below ports are available and not already used by another process. If so , kill them before proceeding with the setup.

Angular UI : Port 4200
Api Gateway : Port 4300
Weather Cache Service: Port 4400
Weather Api:Port 4600
Docker Redis: Port 6379
User Api: Port 4700

Prerequisites: Docker desktop application must be installed.

  • Step 0.0: git clone -b main-project1 https://github.com/airavata-courses/SuperNova.git

  • Step 0.1: cd SuperNova/Project1-WeatherRadar/

  • Step 0.2: (Create Network if not already created)
    docker network create weather-radar-net

  • Step 1.1: Change Directory
    cd weather-api

  • Step 1.2: Build WeatherApi
    docker build -t supernova/weather-radar-api-app .

  • Step 2.1: Run Weather Api Service
    docker run -d --net weather-radar-net --name weather-radar-api-app -p 4600:4600/tcp supernova/weather-radar-api-app:latest

  • Step 2.2: Change Directory
    cd ..

  • Step 3: Pull Redis Image
    docker pull redis

  • Step 4.1: Redis Clean Volumnes
    docker system prune --all --force --volumes

  • Step 4.2: Run Redis Image
    docker run -d --net weather-radar-net --name weather-cache-redis -p 6379:6379 -d redis --save 60 1

  • Step 5.1: Change Directory
    cd weather-cache

  • Step 5.2: Build weather cache app
    docker build -t supernova/weather-cache-app .

  • Step 6.1: Run weather cache app
    docker run -d --net weather-radar-net --name weather-cache-app -p 4400:4400/tcp supernova/weather-cache-app:latest

  • Step 6.2: Change Directory
    cd ..

  • Step 7.1: Change Directory
    cd user-Api

  • Step 7.2: Build User Api
    docker build -t supernova/user-api-app .

  • Step 8.1: Run User Api
    docker run -d --net weather-radar-net --name user-api-app -p 4700:4700/tcp supernova/user-api-app:latest

  • Step 8.2: Change Directory
    cd ..

  • Step 9.1: Change Directory
    cd weather-radar-gateway

  • Step 9.2: Build gateway service
    docker build -t supernova/weather-radar-gateway-app .

  • Step 10.1: Run gateway service
    docker run -d --net weather-radar-net --name weather-radar-gateway-app -p 4300:4300/tcp supernova/weather-radar-gateway-app:latest

  • Step 10.2: Change Directory
    cd ..

  • Step 11.1: Change Directory
    cd weather-radar-ui

  • Step 11.2: Build Weather Radar UI
    docker build -t supernova/weather-radar-ui-app .

  • Step 12: Run Weather Radar UI
    docker run -d --net weather-radar-net --name weather-radar-ui-app -p 4200:4200/tcp supernova/weather-radar-ui-app:latest

Note: Wait for 1 min, till angular ui gets compiled and runs inside docker.