Skip to main content

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

Prompted With

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

django_prod-0.1.3.tar.gz (79.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_prod-0.1.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

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

Hashes for django_prod-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1c9e3d0e1ca3551ad6fcba07ad8d46f1bde3cad934d76fe1d72f65fa724ab067
MD5 2ec287920edfe15785cccea28ba6a291
BLAKE2b-256 41da28f2b2895635fff5d2e21fd342bdcaf5de43930dee421cc80a12d582239a

See more details on using hashes here.

File details

Details for the file django_prod-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_prod-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 522a04ee0756e8a29745e94d3c223880189f6e370d05988a12b27f5cc45a5eac
MD5 233ae38e227f6e1849de50c4ebeeb1e7
BLAKE2b-256 a31ec830517401701035b5e7deebc287600754c8e9dc01a745bfb8dc297826bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page