Closed MikeTheCanuck closed 6 years ago
Two points:
static files (swagger) are found at http://service.civicpdx.org/transportation-systems/static/
<PROJECT_NAME>/static/
route will only appear in the Django Settings. The Swagger and other staticfiles will actually be accessible based on the routing defined in the urls.py
. We should directly define what should be accessible at the project root, ie: http://service.civicpdx.org/transportation-systems/
We will want something here, and need it for the ALB health checks but
Do we want Swagger at the base or the built in browsable api such as in: http://service.civicpdx.org/disaster-resilience/
Better explanation of the reason for these non-obvious routing changes here: https://github.com/hackoregon/elections-2018-backend/issues/3
Do we want Swagger at the base or the built in browsable api such as in (old version of Disaster)?
I have no strong opinion here @bhgrant8 - just want something that will respond healthily and can be used by the public.
Looks like everyone has decided on their API routing in their containers, and I don't have the energy to refactor to a more consistent pattern across the APIs.
TL;DR What's the requirement?
Example of compliant routing
urls.py
hereWhy is this necessary?
Good question, probably-crappy answer incoming: it works. We've hosted API with their endpoints and swagger interfaces like this for two years now. Are there better/different solutions? Probably.
We're dependent on DNS for the URL service.civicpdx.org, ALB (application load balancing) for routing requests to each container, CloudFormation for ensuring there are multiple healthy containers available, and the AWS Health Check protocol for ensuring we're not sending requests to a dead container. Tugging at this solution means re-hydrating the expertise to wrangle all these pieces, and sadly we were understaffed for that amount of work.