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
.envfiles.
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.envfile.
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
backendand a React-basedfrontend. - A
.envfile containing:DOCKER_USERNAME,BACKEND_IMAGE_NAME,FRONTEND_IMAGE_NAME,DEPLOY_HOST, andDEPLOY_USER.
License
MIT
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 deployfilegen-0.1.28.tar.gz.
File metadata
- Download URL: deployfilegen-0.1.28.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb58a0e621fd158e9861932b4044aea0b95bc465f94d0578cfcb6325b1734dbd
|
|
| MD5 |
7da6fb64332b9a4c9a0a9b0450be69dd
|
|
| BLAKE2b-256 |
565023878e2c08b5a8b95f2d7c307567da809eff87e0115d86c1551a06ccb7be
|
File details
Details for the file deployfilegen-0.1.28-py3-none-any.whl.
File metadata
- Download URL: deployfilegen-0.1.28-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3562ff55fe7b9f65c8ebea47eff16ee570ba3e70bb67d98d89fee63895b58d66
|
|
| MD5 |
1f6d2acc37a6c5d1d89e20497f194b4e
|
|
| BLAKE2b-256 |
7e20420cc22379892ab09527f87d80755fd0f61909ba5710f7e476a483b9aa1a
|