In order to have less issues with CORS and be able to use one SSL cert, I would like to run all flynn applications with one domain:
my "external" services
- https://example.com/ - Frontend SPA (static, HTML/javascript)
- https://example.com/api/v1/* - API (Python/Django)
- https://example.com/admin/ - Django Admin
- https://example.com/docs/ - SwaggerUI (static, HTML/Javascript)
- https://example.com/static/ - All static files from user uploads
internal services
- redis
- postgres
$ flynn route (example)
http:api.service.example.com api
http:frontend.service.example.com frontend
http:docs.service.example.com docs
...
To keep things simple, my idea was to use the NGINX as a reverse proxy to take care of the routing and the SSL handling - but where should I put it?
I could add an NGINX as a flynn application that listens to example.com and then make use of location
and proxy_pass
features. But when the NGINX reverses from https://example.com to http://frontend.service.example.com I have no SSL here - is that right?
How to make sure, the NGINX routes only "internally"? Are there even better approaches with flynn - or just use dokku.