A plugin for django-simple-deploy, supporting deployments to VPS providers.
Project description
dsd-vps
A plugin for deploying Django projects to any VPS provider, using django-simple-deploy.
Quick Start
To deploy your project to a VPS, you'll need to ...
Prerequisites
Deployment to a VPS requires the following:
- You must be using Git to track your project.
- You need to be tracking your dependencies with a
requirements.txtfile, or be using Poetry or Pipenv. - You'll need...
Configuration-only deployment (NOT SUPPORTED YET)
First, install dsd-vps and add django_simple_deploy to INSTALLED_APPS in settings.py:
$ pip install dsd-vps
# Add "django_simple_deploy" to INSTALLED_APPS in settings.py.
$ git commit -am "Added django_simple_deploy to INSTALLED_APPS."
When you install dsd-vps, it will install django-simple-deploy as a dependency.
Now run the deploy command:
$ python manage.py deploy
This is the deploy command from django-simple-deploy, which makes all the changes you need to run your project on a VPS.
Automated deployment
This is experimental, and you should review the codebase before running this early version on your system. It will modify local files outside of your project, such as ~/.ssh/config and ~/.ssh/id_rsa_git.
- Create a new VPS instance.
- I'm Using Ubuntu 24.04 on Digital Ocean for development work; any debian-based OS on any VPS provider should work.
- Choose SSH username/password login approach.
- Set two env vars:
$ export DSD_HOST_IPADDR=<droplet-ip-address>$ export DSD_HOST_PW=<droplet-pw>
- Install
dsd-vps.- This will be changed to
dsd-vpsshortly, as it should work for all VPS hosting platforms. - This plugin is not yet available on PyPI; I'm currently using an editable install of the repo.
- This will be changed to
- Add
django_simple_deploytoINSTALLED_APPS. - Run
python manage.py deploy --automate-all.
The deploy command will add a new user named django_user to the droplet, with the same password you originally chose. It will update and configure the server, configure Git on the server, configure the project to be served from the droplet, commit changes, push the project, and open the remote project in a new browser tab.
It will add a local ssh key pair for Git, modifying ~/.ssh/config. The key will be stored at ~/.ssh/id_rsa_git.
The project will be served over http, which means the browser will probably flag it as insecure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dsd_vps-0.1.0.tar.gz.
File metadata
- Download URL: dsd_vps-0.1.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a85b31eed4dd15729037cea280744739db3474e77ad0c650003e4db878e3918b
|
|
| MD5 |
a3925f6affb83d1450358057aabfefaf
|
|
| BLAKE2b-256 |
e6f3aaf9e47ec348db8b26a3f0208ac6405631d506c428df757a76920d0893fa
|
File details
Details for the file dsd_vps-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dsd_vps-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f25d19fd94c4d903625f43815b0d4daaedd6dae1754f4b3bcf2ffc0c0cb89996
|
|
| MD5 |
cc3737677e0e2a3cadd61cec72366254
|
|
| BLAKE2b-256 |
474256101a82f44f51e7f6978f95546370a652d1a17269e3912721f112f838a7
|