Skip to content
2018 disaster-resilience Backend API Service
Branch: development
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin make migrations during development API docker image startup Apr 10, 2019
.dockerignore Make it so, Brian Grant May 6, 2018
.gitignore add package_info view Apr 2, 2019
LICENSE add source from backend repo Apr 27, 2018
disaster.env remove PRODUCTION_ prefix for environment variables May 26, 2018 add source from backend repo Apr 27, 2018
production-docker-compose.yml remove PRODUCTION_ prefix for environment variables May 26, 2018

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.


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/ and specifying either the -d (development) or -p (production) arguments.



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
  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/ -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 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 to use/see the API and to see the schema. To stop the server and images, press CTRL+C and wait a moment for the images to shut down.


coming soon


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


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

You can’t perform that action at this time.