1Start command
With only manage.py it starts the dev server; use gunicorn in production (add it to requirements.txt).
bashpython manage.py migrate && gunicorn mysite.wsgi --bind 0.0.0.0:$PORT --workers 22Connect PostgreSQL
Create postgres in the same project and reference it. Read it with dj-database-url.
bashoc db create postgres --name db oc variables set DATABASE_URL='${{db.DATABASE_URL}}' oc variables set ALLOWED_HOSTS='*'3Deploy (pick one)
① Connect GitHub: Project → Add service → GitHub repository (deploys on push) ② From this folder: oc up --wait (builds even without a Dockerfile) ③ Upload a folder or zip in the console: Add service → Upload source
bashoc login oc project create my-app --link oc up --wait