{"id":24911515,"url":"https://github.com/hackoregon/emergency-response-backend","last_synced_at":"2025-09-07T10:31:34.072Z","repository":{"id":49697461,"uuid":"82257249","full_name":"hackoregon/emergency-response-backend","owner":"hackoregon","description":"backend repo for the emergency response project team 2017","archived":false,"fork":false,"pushed_at":"2021-06-10T20:20:10.000Z","size":2717,"stargazers_count":4,"open_issues_count":10,"forks_count":3,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-08-16T10:50:33.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackoregon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-17T04:29:40.000Z","updated_at":"2019-07-01T17:38:07.000Z","dependencies_parsed_at":"2022-09-24T00:02:18.671Z","dependency_job_id":null,"html_url":"https://github.com/hackoregon/emergency-response-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hackoregon/emergency-response-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackoregon%2Femergency-response-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackoregon%2Femergency-response-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackoregon%2Femergency-response-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackoregon%2Femergency-response-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackoregon","download_url":"https://codeload.github.com/hackoregon/emergency-response-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackoregon%2Femergency-response-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026689,"owners_count":25209739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T04:20:38.180Z","updated_at":"2025-09-07T10:31:34.045Z","avatar_url":"https://github.com/hackoregon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emergency-response\nThis repo represents the backend development work for the Emergency Response Team of Hack Oregon 2016-17 Project Season. The development and deployment chain is modeled on the pattern contained here:  \n\nhttps://github.com/hackoregon/backend-service-pattern\n\n## Dependencies\n\n* Docker or Docker toolkit\n* Database Read-Only Credentials (assumes AWS, otherwise updated settings.py and project_config.py accordingly, Contact Emergency Response Team)\n* Travis-CI (not required for local dev)\n* Cluster deployment keys  - Contact the DevOps team (not required for local dev)\n* ECS Service Name - Contact the DevOps team (not required for local dev)\n\n## Docker:\n\nThis API is built using [Docker](https://www.docker.com/) and [Docker-Compose](https://docs.docker.com/compose/) installed.\n\n## Important:\n\nThis project was setup in a single database environment. Development, testing, and production have been connecting to same database. Prior to granting any write access to API, especially for testing ensure to change:\n  1. The database credentials below will need to change to no longer override the \"TEST_NAME\" to 'fire', change other db creds as needed. It will then create a 'test_fire' database to run tests on. One will need to create method for loading test data.\n   2. Ultimately to destroy the test db with each run you will remove the --keepdb argument from the test scripts.\n\n## To Setup:\n\nTo run the API for the first time:\n\n  1. In the /emerresponseAPI folder create a file project_config.py. Make sure env.sh is in the .gitignore and .dockerignore:\n\n        AWS = {\n                'ENGINE': 'django.contrib.gis.db.backends.postgis',\n                'NAME': '\u003cYOUR_AWS_DB_NAME\u003e',\n                'HOST': '\u003cYOUR_AWS_DB_NAME\u003e',\n                'USER': '\u003cYOUR_AWS_DB_NAME\u003e',\n                'PASSWORD': '\u003cYOUR_AWS_DB_NAME\u003e',\n              }\n\n        DJANGO_SECRET_KEY = \u003cYOUR_DJANGO_SECRET\u003e\n\n  2. Create `env.sh` in the project ./bin folder. Make sure env.sh is in the .gitignore and .dockerignore (You will provide values if deploying to your own cluster. For the Hack Oregon project, consult the team.):\n\n            export DOCKER_REPO=\u003cNOT HERE\u003e\n            export DOCKER_IMAGE=\u003cNOT HERE\u003e\n            export PROJ_SETTINGS_DIR=\u003cNOT HERE\u003e\n            export DEPLOY_TARGET=\u003cNOT HERE\u003e\n            export CONFIG_BUCKET=\u003cNOT HERE\u003e\n            export AWS_ACCESS_KEY_ID=\u003cNOT HERE\u003e\n            export AWS_SECRET_ACCESS_KEY=\u003cNOT HERE\u003e\n            echo \"##############################\"\n            echo  Your Local Project Environment\n            echo \"##############################\"\n            echo DOCKER_REPO: $DOCKER_REPO\n            echo DOCKER_IMAGE: $DOCKER_IMAGE\n            echo PROJ_SETTINGS_DIR: $PROJ_SETTINGS_DIR\n            echo DEPLOY_TARGET: $DEPLOY_TARGET\n            echo CONFIG_BUCKET: $CONFIG_BUCKET\n\n  3. From project root run:  \n\n        $ ./bin/build-proj.sh -l (flag is for local)\n\n  Allow process to run, should build in a few minutes.\n\n  4. Run the tests:\n        $ ./bin/test-proj.sh -l\n\n  5. To start project locally:\n\n        $ ./bin/start-proj.sh -l\n\n  6. Access the swagger docs at:\n\n        $ http://localhost:8000/emergency\n\n  7. Consult here for CI/CD info: https://github.com/hackoregon/backend-service-pattern\n\n  8. For changes in the django code, stop the container and re-run the start-proj.sh command.\n\n  9. For any changes to the docker image, additions to the pip packages (requirements.txt), or other non-code changes rerun the build-proj.sh command.\n\n  10. If you are receiving a 'permission denied' notification on any of the shell commands, they may have lost the executable permission. run: $ chmod +x ./bin/*.* should correct the problem. You may choose to run command on individual files as well.\n\n\n## API Info:\n\n    ## to view admin page/browsable endpoints\n\n    ## open your browser in host machine\n\n    ## for endpoints preview:\n\n    $ http://localhost:8000/emergency/\u003cendpoint\u003e\n\n    ## ie:\n\n    $ http://localhost:8000/emergency/agencies\n\n\n## Pagination\n\n    Pagination currently set to 50\n    ## To select page:\n    'http://localhost:4546/\u003cendpoint\u003e?page=NUM'\n\n\n## Thank You:\n\nThanks to all the members of the Hack Oregon Team. This repo represents the work of many volunteers including the Hack Oregon 2017 Emergency Response and DevOps teams.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackoregon%2Femergency-response-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackoregon%2Femergency-response-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackoregon%2Femergency-response-backend/lists"}