autoflow-tech
v1.0.0
Published
Automated CI/CD CLI tool for students and beginners
Downloads
115
Maintainers
Readme
📖 About AutoFlow
AutoFlow simplifies the deployment process by bridging your local development environment directly to a remote server. It automates complex DevOps tasks like Git operations, Docker orchestration, Nginx reverse proxy setup, and SSL configuration.
Abstract away the quirks of Linux administration, Docker configurations, and Nginx setups behind a simple, unified, and beautiful CLI interface!
✨ Key Features
- 🤖 Smart Framework Detection: Automatically detects Next.js, Vite, React, Vue, Node.js or Static sites and prepares an optimal, production-ready
Dockerfile. - 🔐 Secure Global Configuration: Securely stores your Server IP and SSH credentials globally so you only configure it once. Uses strict
600file permissions. - ⚡ Atomic Deployments: Achieves near-zero downtime deployments with rapid container swapping, plus automatic OOM (Out of Memory) crash prevention by creating Swap space on low-RAM servers.
- 🔒 Auto SSL (HTTPS): Automatically requests and configures free Let's Encrypt SSL certificates (via Certbot) when a custom domain is provided.
- 📊 Real-time Observability: Instantly view container CPU/RAM stats or stream live application logs (stdout/stderr) right inside your local terminal.
🛠️ Installation
Requirements:
- Local Machine: Node.js (v18 or higher)
- Remote Server: A Linux VPS (Ubuntu/Debian recommended) with Docker, Docker Compose, and Git installed.
Install the CLI globally using npm:
npm install -g autoflow-cli🚀 Getting Started
Deploying your app is as easy as running a few simple commands!
1️⃣ Global Setup (Run Once)
Setup your VPS details globally so you never have to re-enter them for other projects.
autoflow setup(You will be prompted for: Server IP, SSH Username, SSH Port, and SSH Private Key path)
2️⃣ Initialize Project
Navigate to your project directory and initialize AutoFlow. It will automatically detect your project's framework and set up necessary configurations.
cd my-awesome-app
autoflow init(Prompts for: Project Name, Git Repository URL, and optionally a Domain name)
3️⃣ Deploy!
Push your code to Git, build it on the remote server, and deploy it automatically.
autoflow deployWhat happens under the hood?
- Auto-commits and pushes local changes to your Git repository.
- Connects securely to your VPS via SSH.
- Pulls the latest code on the server.
- Builds a fresh isolated Docker Image.
- Configures Nginx and provisions SSL (if domain was configured in
init). - Boots the new container effortlessly.
4️⃣ Monitor and Manage
Check the live stats (CPU/Memory/Status) of your running container:
autoflow statusNeed to gracefully stop and clean up the application?
autoflow stop⚙️ Architecture Pipeline
AutoFlow operates using a Local -> Git -> Remote pipeline:
- Local: You run
autoflow deploy. Your local code is synced/pushed automatically to your Git provider (GitHub/GitLab/Bitbucket). - Remote: AutoFlow SSHs into your VPS securely from your local machine.
- Build: The server pulls the latest Git code into a temp directory and executes an optimal Docker build.
- Serve: Docker containers are created or restarted, and live Nginx routing rules are updated automatically.
💡 Troubleshooting
- Permissions Error (Linux/Mac): Ensure your private SSH key has proper permissions:
chmod 600 ~/.ssh/id_rsa. - Node Version: Ensure you're running Node.js
>= 18. You can check withnode -v. - Server Memory: If deployments fail unexpectedly during build, ensure your VPS has at least 1GB of RAM or available swap space (AutoFlow tries to allocate swap automatically but some hosts restrict this).
📜 License
This project is licensed under the MIT License.
