Giter Club home page Giter Club logo

disaster-resilience-backend's Introduction

Disaster Resilience 2018 Backend Applicaton Server

Backend API application server written in Django + Django REST Framework application to serve disaster data from a postgreSQL database through a REST API.

Description

When run, the application provides an http endpoint on the local system that serves the API via REST. The application can be run in two environments. For the development environment two Docker images that can be built and run are provided. The first image is the API application while the second is the postgreSQL database from which the API application serves data. For production envrionments a single image is provided, intended to allow the API application to be run on a web server instance such as AWS and connect to an existing postgreSQL database as the data source. Once built, the images can be started by running bin/start.sh and specifying either the -d (development) or -p (production) arguments.

Usage

Development

Before running the development server application, the database must be restored from a backup file and the Docker images must be built. (Talk to the Disaster Resilience Team if you need to obtain a copy of the database backup file)

  1. Clone the git repo:
$ cd ~/src
$ git clone [email protected]:hackoregon/disaster-resilience-backend.git
  1. Copy disaster.env to .env:
$ cp ./disaster.env ./.env
  1. Place copy of the disaster database backup in the Backups/ directory.
  2. Execute the start script with -d to (build and) start the images:
$ bin/start.sh -d

The images will then build for a few minutes. Once the API application has completed starting up, you will see the following message:

Django application has started. Browse to 0.0.0.0:8000 to see the API.

At this point the API is exposed at an endpoint on your local machine; point a client at or browse to 0.0.0.0:8000/api to use/see the API and 0.0.0.0:8000/schema to see the schema. To stop the server and images, press CTRL+C and wait a moment for the images to shut down.

Production

coming soon

Branches

  1. master - not used
  2. staging - deploy to AWS
  3. development - active development

History

This repo represents the work of many members of the Hack Oregon project team. The roots of this work began with the 2017 backend-service-pattern, the work of the DevOps and platform teams, and the APIs deployed for the 2017 seasons.

The current implementation's application and database docker images were generated from the backend-exemplar-2018 repo, which is based on the transportation-system-backend and passenger_census_api repos. The database structure is an implementation of the PostGIS container from the data-science-pet-containers repo.

Major Contributors

disaster-resilience-backend's People

Contributors

adpeters avatar bhgrant8 avatar brianhgrant avatar mikethecanuck avatar nam20485 avatar znmeb avatar

Watchers

 avatar  avatar

disaster-resilience-backend's Issues

test

test slack integration

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.