Migrate a Django App from Heroku to Render (and get it ready for prod)
A Django e-commerce app (Saleor) can be moved from Heroku to Render by translating its app.json, Procfile, Dockerfiles and docker-compose.yml into a single render.yaml Blueprint. The walkthrough defines the GraphQL API as a web service on Render's native Python environment, then wires in Postgres and Redis through connection-string environment variables. It adds a build script for dependencies and migrations, a static-site dashboard with rewrite rules, and a Next.js storefront that drops the redundant nginx layer. The second half covers production hardening: an RSA key stored as a Secret File, background workers, cron jobs, runtime steps, a message broker, and deriving shared environment variables to keep the Blueprint DRY.
Related posts
- Migrate a Rails App from Heroku to Render
Render mediumAdept
Migrating the open-source git-scm.org Rails app from Heroku to Render means mapping Heroku concepts (web/worker processes, dynos, Heroku Postgres/Redis, Scheduler, config vars) to Render equivalents and codifying the whole stack in a render.yaml Blueprint. The walkthrough defines a Ruby web service, wires PostgreSQL and Redis connection strings in through environment variables, and adds a bin/render-build.sh script for asset precompilation and migrations that Heroku's buildpack used to handle. It also prompts for secrets like the Bonsai Elasticsearch URL with sync: false, schedules nightly rake tasks as a standalone Cron Job, and deduplicates shared variables with an Environment Group. Practical tips include copying SECRET_KEY_BASE from Heroku so users stay logged in, adding a .ruby-version file, and checking Procfile, app.json and heroku.yml to discover the app's components.
- Deploying Django to Replit
Replit mediumAdeptReplit can host a Django app either from its built-in Django App Template or by importing an existing project from GitHub, with the .replit run command (python manage.py runserver 0.0.0.0:3000) starting the server on a Replit-supplied domain. The walkthrough builds a simple tasks app with a view, URL route and Bootstrap template. GitHub imports also need X_FRAME_OPTIONS set and the repl domain added to ALLOWED_HOSTS. Production use still calls for a sturdier database than the default SQLite and a friendlier domain.
- Migrating From Heroku To Railway
Railway mediumAdeptMoving a Heroku app to Railway comes down to three steps: deploy from a GitHub repo, import Heroku config vars, and add Postgres and Redis as separate database services. Railway reads the repo's Procfile and turns each named process (e.g. web, worker) into its own service, which takes the place of Heroku's dyno process model. It injects DATABASE_URL and REDIS_URL automatically, so any imported Heroku copies of those variables must be deleted or they will override Railway's. The guide also covers `railway run` for running commands like migrations against cloud variables, `railway up` for CLI deploys, and having apps listen on 0.0.0.0:$PORT so Railway can expose them.
- ...It Works Fine Locally
Render mediumAdept
A deployment checklist for apps that run locally but fail in the cloud, drawn from Render support cases. Pin language, package manager and dependency versions, and keep secrets and service URLs in environment variables. Add a health check endpoint that touches critical dependencies, build with production dependency groups and precompile assets rather than shipping dev servers, and bind to 0.0.0.0 on $PORT with worker counts tuned to the plan. Treat instance filesystems as ephemeral and use disks, databases or object storage for persistent files, and configure allowed hosts, canonical redirects and HTTPS asset URLs for custom domains.
- How To Set Up a Staging Environment on Heroku in 3 Easy Steps
Heroku Engineering mediumAdeptHeroku pipelines let you put a staging app in front of production: disable auto-deploy on production, create a pipeline with a new staging app auto-deploying from GitHub, and optionally enable Review Apps per pull request. Staging should be isolated per Twelve-Factor principles, with separate config vars and its own Postgres database. That database is either built from migrations via the release phase and app.json postdeploy scripts, or copied from production with the destructive pg:copy when the data is not sensitive. Promotion copies the already-compiled slug to production rather than rebuilding, so verified code runs unchanged and rollbacks are fast, though database migrations must be rolled back separately.