Demo project to run Django application in Google Cloud Platform(GCP).
- Firebase Hosting rewrite any source to Cloud Run container
- Static contents(
/static
) response directly by Firebase Hosting
- Browser access to
Firebase Hosting
- If path start with
/static
and resource is exists, Fb response directly it- Therese resources are deployed by
firebase deploy
andmanage.py collectstatic
- Therese resources are deployed by
- Any requests are passed Cloud Run.
- In container, running Django application.
- For
/static
requests, response 404 (application does not collect static contents)
$ poetry install
$ poetry build
$ docker build -t gcr.io/YOUR-PROJECT/YOUR-IMAGE-NAME
$ docker push gcr.io/YOUR-PROJECT/YOUR-IMAGE-NAME
$ yarn
$ poetry run ./manage.py collectstatic
$ yarn firebase deploy