Skip to main content

A production-grade CLI tool to generate deployment configuration files for Django/React projects.

Project description

deployfilegen

deployfilegen is a production-grade Python CLI library designed to automatically generate production-ready deployment configuration files for full-stack applications (Django + React).

Writing Dockerfiles, Compose configs, and CI pipelines repeatedly is slow and error-prone. deployfilegen automates this process using secure, battle-tested defaults.

Quick Start

# 1. Install the tool
pip install deployfilegen

# 2. Initialize your project
deployfilegen init

# 3. Deploy locally
docker compose -f docker-compose.prod.yml up --build

Why deployfilegen?

Standardizing deployment is hard. This tool ensures your project follows industry best practices out of the box:

  • Security: All containers run as non-root users.
  • Reliability: Automated healthchecks and dependency waiting.
  • CI/CD: Complete GitHub Actions workflow with Docker layer caching.
  • Zero Hardcoding: All configuration is derived from your .env files.

Example Project Structure

The tool expects a standard full-stack layout:

my-cool-project/
├── backend/            # Django project
│   └── manage.py
├── frontend/           # React project
│   └── package.json
└── .env                # Required environment variables

CLI Output Example

$ deployfilegen init
INFO: Initializing deployfilegen in /path/to/project (Mode: prod)
INFO: Detected Django backend.
INFO: Detected React frontend.
INFO: Loaded environment from: .env
INFO: Generating Backend Dockerfile...
INFO: Generated backend/Dockerfile
INFO: Generating Frontend Dockerfile...
INFO: Generated frontend/Dockerfile
INFO: Generating Docker Compose...
INFO: Generated docker-compose.prod.yml
INFO: Generating GitHub Actions workflow...
INFO: Generated .github/workflows/deploy.yml
INFO: Deployment configuration generated successfully!

Usage

Navigate to your project root and run:

# Generate a boilerplate .env template
deployfilegen template

# Initialize your project
deployfilegen init [OPTIONS]

Commands

  • init: Initialize deployment configuration.
  • template: Generate a boilerplate .env file.

Global Options

  • --version, -v: Show the version and exit.
  • --help: Show this message and exit.

init Command Options

Option Description
--mode prod Generates docker-compose.prod.yml (Default). Optimized for servers.
--mode dev Generates docker-compose.dev.yml. Optimized for local coding.
--force, -f Overwrite existing files. (Default: skips existing files).
--docker-only Generate only the Dockerfiles.
--compose-only Generate only the Docker Compose files.
--github-only Generate only the GitHub Actions workflow.
--backend-only Filter generation to only Backend components.
--frontend-only Filter generation to only Frontend components.

Requirements

  • Python 3.9+
  • A project structure with a Django-based backend and a React-based frontend.
  • A .env file containing: DOCKER_USERNAME, BACKEND_IMAGE_NAME, FRONTEND_IMAGE_NAME, DEPLOY_HOST, and DEPLOY_USER.

License

MIT

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

deployfilegen-0.1.21.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

deployfilegen-0.1.21-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file deployfilegen-0.1.21.tar.gz.

File metadata

  • Download URL: deployfilegen-0.1.21.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for deployfilegen-0.1.21.tar.gz
Algorithm Hash digest
SHA256 ca68dd4316a6c24be7bc15aeeec15784b8b13b36115f234fb17b58cecb1ea84f
MD5 5e3d245a0e6fcf389366cdb0b2644cac
BLAKE2b-256 b5596ca91db1841f0052a006af3c4d7ebb975062832648b7a2e2682f3f281543

See more details on using hashes here.

File details

Details for the file deployfilegen-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: deployfilegen-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for deployfilegen-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4fd3e7cd98a6407bc8b70c655ab411286ab8b1bef148e7f4c235287ffccec2
MD5 e9fd608b0854e328e8985676688b7bdb
BLAKE2b-256 fd6a6969ab14f239d8c8af4d83f5fc11c5ba1d0a845b07521a3c8e6f2c4ee91c

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