CLOVER is a lightweight yet powerful cloud orchestration tool designed to simplify and streamline the deployment, management, and monitoring of resources. With CLOVER, you can handle DNS records, deploy and terminate Docker containers, manage Nginx configurations, and monitor system metrics all in one place.
- Manage DNS records through Cloudflare API
- Deploy and terminate Docker containers effortlessly
- Automatically configure and manage Nginx sites
- View system metrics (CPU, RAM, Disk usage)
- Easy-to-use web interface
- Python 3.8 or higher
- Docker installed and running
- Nginx installed and configured
- Cloudflare account with API Token and Zone ID
-
Clone the Repository
git clone <repository-url> cd <repository-folder>
-
Install Dependencies Install the required Python packages:
pip install -r requirements.txt
-
Configure Environment Variables Create a
.envfile in the root directory with the following content ( or a sample is provided, just rename it and replace with your credentials):CLOUDFLARE_API_TOKEN=q2-"YOUR API TOKEN" CLOUDFLARE_ZONE_ID="YOUR ZONE ID" API_URL="YOUR URL" DOMAIN="YOUR DOMAIN" IPADDRESS="SERVER IP ADDRESS" AUTHORIZED_UIDS="UIDs (Separated by comma)"
Replace the placeholder values with your actual credentials and configuration.
-
Modify Firebase Configuration Update the Firebase configuration in
templates/login.htmlto match your Firebase project settings:<script> const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "YOUR_PROJECT_ID.firebaseapp.com", projectId: "YOUR_PROJECT_ID", storageBucket: "YOUR_PROJECT_ID.appspot.com", messagingSenderId: "YOUR_SENDER_ID", appId: "YOUR_APP_ID" }; firebase.initializeApp(firebaseConfig); </script>
-
Build the Docker Image To simplify deployment, CLOVER includes a Dockerfile. Build the Docker image with the following command:
docker build -t clover:latest . -
Run the Docker Container Use the following command to start the application as a Docker container:
docker run -d --env-file .env -p 5555:5555 clover:latest
-
Access the Application Open your browser and navigate to
http://<your-server-ip>:5555.
- Log in using authorized credentials.
- Navigate to the deployment page.
- Fill out the form with the necessary details (e.g., port, subdomain, image name).
- Submit the form to deploy the application.
- Navigate to the termination page.
- Enter the subdomain and container name.
- Submit the form to terminate the resources.
- Navigate to the logs page.
- Select a container to view its logs.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
If you have any questions or need assistance, feel free to reach out.