hackoregon / civic-devops

Master collection point for issues, procedures, and code to manage the HackOregon Civic platform
MIT License
11 stars 4 forks source link

patch all the API repos to use project-name routes like we did last year #135

Closed MikeTheCanuck closed 6 years ago

MikeTheCanuck commented 6 years ago

2018 disaster resilience API service is returning 404 Not Found error when requested via http://service.civicpdx.org/disaster-resilience or any sub-route.

We applied this fix last year to deal with co-hosting 5 apps on the same hostname (e.g. service.civicpdx.org/budget): https://github.com/hackoregon/team-budget/commit/8536aca0e1a8176dfe9e9063d55d319d80767ca9#diff-e927b8d55fea7a008487742f7e579663

It wouldn't surprise me that we need to make the same fix to the 2018 API projects as well.

MikeTheCanuck commented 6 years ago

I'm testing this out right now on the DR project: https://github.com/hackoregon/disaster-resilience-backend/commit/12ff1266b8d2a8b31e1d4d9dfbb1d9f78539cbb4

After applying this fix and deploying, we now receive a 500 Internal Server Error. CloudWatch logs report: django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.

MikeTheCanuck commented 6 years ago

I fixed that with this commit and now it's back to 404 errors: https://github.com/hackoregon/disaster-resilience-backend/commit/a453639cf2b9e6943a5330ba28731277a79077c7

MikeTheCanuck commented 6 years ago

Looks like the * and / fixes did the trick (at least until ECS and/or ALB started playing havoc with working setup).