Quickly deploy over SSH your newly generated django project.
Project description
django-prod
Quickly deploy over SSH your newly generated django project.
This package provides two management commands:
django_prod_init— generates all production files you need.django_prod_deploy— deploys your project to a remote SERVER over SSH.
📦 Installation
Install the package:
pip install django-prod
🛠 Example
Create a new django project:
django-admin startproject webapp .
Add django-prod to installed apps:
# settings.py
INSTALLED_APPS = [
...
"django_prod",
]
Initialize production files:
python manage.py django_prod_init
Deploy to your server:
python manage.py django_prod_deploy
You will be prompted for:
- Server IP address
- SSH username
- Path to your SSH private key
Then the script will:
- Upload your project to the server
- Ensure Docker is installed
- Run your production stack with Docker Compose
This project is opinionated and uses the simplest technologies possible to move from development to production quickly. It relies on SQLite as the production database, and for those who still consider SQLite a “toy database,” I strongly encourage you to look into its performance when properly configured. That’s why the project includes a dedicated configuration to get the most out of SQLite (see settings_prod.py).
It also uses WhiteNoise to handle static files. Performance is more than acceptable once assets are cached and served through a CDN (for example, a Cloudflare proxy).
The third technology used is Docker and Docker Compose. no need to explain why :)
Project details
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 django_prod-0.1.3.tar.gz.
File metadata
- Download URL: django_prod-0.1.3.tar.gz
- Upload date:
- Size: 79.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c9e3d0e1ca3551ad6fcba07ad8d46f1bde3cad934d76fe1d72f65fa724ab067
|
|
| MD5 |
2ec287920edfe15785cccea28ba6a291
|
|
| BLAKE2b-256 |
41da28f2b2895635fff5d2e21fd342bdcaf5de43930dee421cc80a12d582239a
|
File details
Details for the file django_prod-0.1.3-py3-none-any.whl.
File metadata
- Download URL: django_prod-0.1.3-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
522a04ee0756e8a29745e94d3c223880189f6e370d05988a12b27f5cc45a5eac
|
|
| MD5 |
233ae38e227f6e1849de50c4ebeeb1e7
|
|
| BLAKE2b-256 |
a31ec830517401701035b5e7deebc287600754c8e9dc01a745bfb8dc297826bc
|