Skip to content

Cloud Computing (CC) repository for PREDICT (PRE DIsaster Consciousness Tips), that predict future disasters ( Banjir, ... )

Notifications You must be signed in to change notification settings

red-hat-bangkit/predict-cc

Repository files navigation

PREDICT BACKEND

A backend repository for PREDICT application

Cloud Run Deploy

Contribute to this repository

Frontend Usage

Backend Usage

  • Install requirements

    pip install -r requirements.txt
    
  • Decrypt files

    sudo apt-get install -yqq p7zip-full
    LARGE_SECRET_PASSPHRASE=<YOUR_PASSPHRASE>
    ./decrypt-file.sh
    
  • Run application

    python main.py
    

    go to http://localhost:8000/docs

  • Test application

    python main.py test
    
  • Generate GQL Schema (deprecated)

    python main.py generate-schema
    
  • Alembic migration (deprecated)

    alembic revision --autogenerate -m "Init Migration"
    
    alembic upgrade head
    

Docker usage

  • Build image
    docker build -t predictws:0.0.1 .
    
  • Run container from image
    docker run --name predict_app -p 80:8080 predictws:0.0.1
    
  • Stop and remove container
    docker container stop predict_app && docker rm $_
    

Heroku deployment

  • Connect repository to heroku app

    heroku git:remote -a <HEROKU-APP-NAME>
    
  • Set heroku stack to container

    heroku stack:set container
    
  • Decrypt secrets

    sudo apt-get install -yqq p7zip-full
    LARGE_SECRET_PASSPHRASE=<YOUR_PASSPHRASE>
    ./decrypt-file.sh
    
  • Deploy to heroku

    ./deploy.sh
    
  • Deploy to GCP CLoud Run

About

Cloud Computing (CC) repository for PREDICT (PRE DIsaster Consciousness Tips), that predict future disasters ( Banjir, ... )

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •