Welcome to Reflow! This repository contains a straightforward command-line interface (CLI) deployment manager designed specifically for Next.js applications. Utilizing Docker with Nginx and Blue-Green deployment strategies, Reflow simplifies the deployment process on Linux Virtual Private Servers (VPS).
- Features
- Installation
- Usage
- Deployment Strategies
- Configuration
- Contributing
- License
- Contact
- Releases
- Easy Deployment: Quickly deploy Next.js applications using a simple command.
- Blue-Green Deployment: Minimize downtime and risk by switching between two identical environments.
- Docker Support: Leverage the power of containers for a consistent deployment experience.
- Nginx Integration: Use Nginx for serving your applications efficiently.
- CI/CD Ready: Integrate with your existing CI/CD pipelines seamlessly.
To get started with Reflow, follow these steps:
-
Clone the Repository:
git clone https://github.com/CHETHAN562/reflow.git cd reflow
-
Install Dependencies: Ensure you have Docker installed on your Linux VPS. You can install it using the following commands:
sudo apt update sudo apt install docker.io sudo systemctl start docker sudo systemctl enable docker
-
Build the Docker Image: Run the following command to build the Docker image:
docker build -t reflow .
-
Run the CLI Tool: You can now run the Reflow CLI tool. Check the usage section for details.
After installation, you can use Reflow to manage your Next.js deployments. Here’s a basic command to get you started:
./reflow deploy <your-nextjs-app>
Replace <your-nextjs-app>
with the path to your Next.js application. This command will initiate the deployment process using the Blue-Green strategy.
deploy
: Deploy your Next.js application.status
: Check the status of your current deployment.rollback
: Roll back to the previous version of your application.
Reflow implements the Blue-Green deployment strategy, which allows you to maintain two identical environments (Blue and Green). You can switch traffic between these environments with minimal downtime. Here’s how it works:
- Prepare the Green Environment: Deploy your new version to the Green environment.
- Test the Green Environment: Ensure everything works as expected.
- Switch Traffic: Once validated, switch traffic from Blue to Green.
- Rollback if Necessary: If issues arise, revert traffic back to Blue.
This strategy significantly reduces the risk associated with deploying new versions.
Reflow allows you to customize your deployment settings through a configuration file. Create a file named reflow-config.json
in the root of your project. Here’s an example configuration:
{
"appName": "My Next.js App",
"port": 3000,
"dockerImage": "my-nextjs-app:latest",
"nginxConfig": {
"serverName": "myapp.com",
"root": "/usr/share/nginx/html"
}
}
appName
: Name of your application.port
: Port on which your application will run.dockerImage
: Docker image to use for deployment.nginxConfig
: Nginx configuration settings.
We welcome contributions to Reflow! If you’d like to help improve the project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature/YourFeature
. - Open a pull request.
Please ensure your code adheres to the existing style and includes tests where applicable.
Reflow is licensed under the MIT License. See the LICENSE file for details.
For questions or suggestions, feel free to reach out:
- Author: Chethan
- Email: [email protected]
- GitHub: CHETHAN562
To download the latest release, visit the Releases section. Make sure to download the appropriate file and execute it to get started.
Thank you for checking out Reflow! We hope this tool makes your Next.js deployments smoother and more efficient. Happy coding!