A plugin for deploying Django projects to Render, using django-simple-deploy.
For full documentation, see the documentation for django-simple-deploy.
Deployment to Render requires the following:
- You must be using Git to track your project
git init .
git add .
git commit -m "Initial commit"
-
You must be hosting your Git repository on GitHub, GitLab or Bitbucket. (For the free tier of Render, it must be a public repository.)
-
You need to be tracking your dependencies with a
requirements.txtfile, or be using Poetry or Pipenv. -
Create a Render account
-
Install the Render CLI.
First, install dsd-render and add django_simple_deploy to INSTALLED_APPS in settings.py:
$ pip install dsd-render
# Add "django_simple_deploy" to INSTALLED_APPS in settings.py.
$ git commit -am "Added django_simple_deploy to INSTALLED_APPS."When you install dsd-render, it will install django-simple-deploy as a dependency.
Now run the deploy command:
$ python manage.py deployThis is the deploy command from django-simple-deploy, which makes all the
changes you need to run your project on Render.
At this point, you should review the changes that were made to your project.
Running git status will show you which files were modified, and which files
were created for a successful deployment. If you want to continue with the
deployment process, commit these changes and push them up to your remote.
$ git add .
$ git commit -m "Configured for deployment to Render."
$ git pushCreate a Blueprint in Render, give it a name and deploy it.
Go to the postgres instance's dashboard to get the internal connection url.
Use this value to define the DATABASE_URL environment variable for the
created service. Save and deploy the changes.
The project is configured to automatically redploy for each push to the remote. Your updates should be available momentarily.
- NOTE: automatically deployments can be disabled, and the CLI can be used to trigger deployments manually.
You can find a record of the deployment process in dsd_logs/. It contains
most of the output you saw when running deploy.
If you want to delete what you've just deployed to Render, you can do so in the dashboard. You must "disconnect" the blueprint and delete both the web and Postgres services. Go to each dashboard individually, choose settings and scroll to the bottom of each.