https://<app>.on.getfloo.com with a Postgres sibling service, signed-in users, and (optionally) your own domain.
If you’ve never deployed to floo before, read Golden Path first for the minimal three-command flow.
Before you start
You need:- A Django 4+ project (or a fresh
django-admin startproject mysite). - The project pushed to a GitHub repository.
- The floo CLI installed and authenticated (
curl -fsSL https://getfloo.com/install.sh | bashthenfloo auth login).
1. Add a Dockerfile
Dockerfile
gunicorn and dj-database-url to your requirements.txt:
2. Configure Django for production
Updatemysite/settings.py to read floo’s runtime env vars:
mysite/settings.py
DJANGO_SECRET_KEY and set it once the app exists (step 4).
3. Initialize the floo config
floo.app.toml
migrate_command runs after every deploy and promote.
4. Connect the repo and deploy
Your Django app is live at
https://my-django-app-dev.on.getfloo.com.5. Add a Postgres database
floo.app.toml
DATABASE_URL is injected. dj-database-url parses it automatically — no settings change needed. The next deploy runs your migrate_command against the new database before traffic shifts.
6. Add per-user auth
floo manages user authentication for you. Setaccess_mode = "accounts" in floo.app.toml:
floo.app.toml
- Redirects unauthenticated requests to a hosted login page.
- Validates the session cookie on every request.
- Injects identity headers into every request that reaches your Django app.
request.floo_user:
mysite/middleware.py
mysite/settings.py
mysite/views.py
7. Add a custom domain
_floo-verify TXT records shown by floo domains add, then
run floo domains verify app.example.com --app my-django-app.
USE_X_FORWARDED_HOST = True and SECURE_PROXY_SSL_HEADER mean Django builds correct absolute URLs (for redirects, mailers, request.build_absolute_uri) without extra config.
8. Local development with prod data
dev_command locally with DATABASE_URL and other env vars sourced from your dev floo app — real Cloud SQL connection, no credentials in your shell history.
To also test signed-in flows for this accounts-mode app, add --fixture-user:
floo dev then starts a small proxy in front of each service that injects the same X-Floo-User-* headers floo’s gateway adds in production. The output table shows both the raw service URL and the auth-proxied URL — hit the auth-proxied one for any path that reads identity headers.
Common gotchas
/healthzis reserved. Cloud Run’s edge intercepts that exact path. Use/healthor/livez.- Bind to
0.0.0.0.127.0.0.1won’t accept Cloud Run traffic. DEBUG = Truein prod is a security hole. SetDJANGO_DEBUG=false(or just don’t set it — the default in the example above).DJANGO_SECRET_KEYmust be set. Without it, Django’s session cookies can be forged. Generate withget_random_secret_key()and set viafloo env set.collectstaticruns in the Dockerfile. WhiteNoise’sCompressedManifestStaticFilesStoragerequires it.SECURE_PROXY_SSL_HEADERis required behind a proxy. Without it,request.is_secure()returns False and Django redirect loops can form whenSECURE_SSL_REDIRECT=True.
What’s next
Add User Auth — full reference
Identity headers, access policies, and access modes in detail.
Managed Services
Postgres, Redis, Storage — what they cost and how isolation works.
Custom Domains
DNS, verification, multi-service routing.
Cron Jobs
Schedule recurring Django management commands inside your container.