Updating Files
هذا الالتزام موجود في:
84
README.md
84
README.md
@@ -1,24 +1,24 @@
|
||||
# 🌤️ Complete GitHub Actions CI/CD Weather Forecast App on Ghaymah Cloud
|
||||
|
||||
A simple modern **Flask-based weather forecast application** that fetches real-time weather data from [OpenWeatherMap](https://openweathermap.org/) and provides a beautiful, responsive UI. This project is **Dockerized** and supports **CI/CD deployment** to **Ghaymah Cloud** using the included shell script.
|
||||
A simple modern **Flask-based weather forecast application** that fetches real-time weather data from [OpenWeatherMap](https://openweathermap.org/) and provides a beautiful, responsive UI. This project is **Dockerized** and supports **CI/CD deployment** to **Ghaymah Cloud** using the included shell script.
|
||||
|
||||
|
||||
## 🚀 Features
|
||||
## 🚀 Features
|
||||
|
||||
- 🌍 Search weather for any city worldwide
|
||||
- 🌡️ Shows temperature, feels-like, humidity, pressure, wind speed, and visibility
|
||||
- 🌅 Displays sunrise and sunset times
|
||||
- 📊 Auto-updating with timestamp
|
||||
- 🎨 Responsive and modern UI (HTML, CSS, JS embedded in Flask)
|
||||
- 🐳 Dockerized for portability
|
||||
- ☁️ CI/CD ready with Ghaymah Cloud
|
||||
- 🌍 Search weather for any city worldwide
|
||||
- 🌡️ Shows temperature, feels-like, humidity, pressure, wind speed, and visibility
|
||||
- 🌅 Displays sunrise and sunset times
|
||||
- 📊 Auto-updating with timestamp
|
||||
- 🎨 Responsive and modern UI (HTML, CSS, JS embedded in Flask)
|
||||
- 🐳 Dockerized for portability
|
||||
- ☁️ CI/CD ready with Ghaymah Cloud
|
||||
|
||||
|
||||
## 📂 Project Structure
|
||||
## 📂 Project Structure
|
||||
|
||||
```
|
||||
.
|
||||
├── .github/workflows/cicd.yaml # GitHub Actions CI/CD workflow for my App
|
||||
├── .github/workflows/cicd.yaml # GitHub Actions CI/CD workflow for my App
|
||||
├── app.py # Flask application with weather API integration
|
||||
├── CICDpipeline.sh # CI/CD pipeline script for Docker + Ghaymah Cloud
|
||||
├── Dockerfile # Dockerfile to containerize the Flask app
|
||||
@@ -27,14 +27,14 @@ A simple modern **Flask-based weather forecast application** that fetches real-
|
||||
└── README.md # Documentation
|
||||
```
|
||||
|
||||
## ⚙️ Prerequisites
|
||||
## ⚙️ Prerequisites
|
||||
|
||||
Before running or deploying the app, ensure you have:
|
||||
Before running or deploying the app, ensure you have:
|
||||
|
||||
- [Python 3.9+](https://www.python.org/downloads/)
|
||||
- [Docker](https://docs.docker.com/get-docker/)
|
||||
- [Ghaymah CLI (`gy`)](https://docs.ghaymah.io) installed and configured
|
||||
- An [OpenWeatherMap API key](https://home.openweathermap.org/api_keys)
|
||||
- [Python 3.9+](https://www.python.org/downloads/)
|
||||
- [Docker](https://docs.docker.com/get-docker/)
|
||||
- [Ghaymah CLI (`gy`)](https://docs.ghaymah.io) installed and configured
|
||||
- An [OpenWeatherMap API key](https://home.openweathermap.org/api_keys)
|
||||
|
||||
|
||||
|
||||
@@ -91,16 +91,16 @@ Before running or deploying the app, ensure you have:
|
||||
|
||||
|
||||
|
||||
## 🛠️ Local Development
|
||||
## 🛠️ Local Development
|
||||
|
||||
1. Clone this repository:
|
||||
1. Clone this repository:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/your-username/weather-app.git
|
||||
cd weather-app
|
||||
```
|
||||
|
||||
2. Create and activate a virtual environment:
|
||||
2. Create and activate a virtual environment:
|
||||
|
||||
```bash
|
||||
python -m venv venv
|
||||
@@ -108,71 +108,71 @@ Before running or deploying the app, ensure you have:
|
||||
venv\Scripts\activate # Windows
|
||||
```
|
||||
|
||||
3. Install dependencies:
|
||||
3. Install dependencies:
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
4. Run the app:
|
||||
4. Run the app:
|
||||
|
||||
```bash
|
||||
python app.py
|
||||
```
|
||||
|
||||
5. Open your browser at:
|
||||
5. Open your browser at:
|
||||
👉 http://127.0.0.1:5000
|
||||
|
||||
|
||||
|
||||
## 🐳 Running with Docker
|
||||
## 🐳 Running with Docker
|
||||
|
||||
1. Build the Docker image:
|
||||
1. Build the Docker image:
|
||||
|
||||
```bash
|
||||
docker build -t weather-app:1 .
|
||||
```
|
||||
|
||||
2. Run the container:
|
||||
2. Run the container:
|
||||
|
||||
```bash
|
||||
docker run -p 5000:5000 weather-app:1
|
||||
```
|
||||
|
||||
3. Visit the app at:
|
||||
3. Visit the app at:
|
||||
👉 http://localhost:5000
|
||||
|
||||
|
||||
|
||||
# ☁️ Deployment to Ghaymah Cloud uisng **CICDpipeline.sh** Script
|
||||
# ☁️ Deployment to Ghaymah Cloud uisng **CICDpipeline.sh** Script
|
||||
|
||||
This project includes a **CICDpipeline.sh** script that:
|
||||
- Builds and tags Docker images
|
||||
- Pushes them to Docker Hub
|
||||
- Creates a `.ghaymah.json` config
|
||||
- Deploys the app to **Ghaymah Cloud**
|
||||
This project includes a **CICDpipeline.sh** script that:
|
||||
- Builds and tags Docker images
|
||||
- Pushes them to Docker Hub
|
||||
- Creates a `.ghaymah.json` config
|
||||
- Deploys the app to **Ghaymah Cloud**
|
||||
|
||||
### 🔧 Steps
|
||||
### 🔧 Steps
|
||||
|
||||
1. Make the script executable:
|
||||
1. Make the script executable:
|
||||
|
||||
```bash
|
||||
chmod +x CICDpipeline.sh
|
||||
```
|
||||
|
||||
2. Run the deployment script:
|
||||
2. Run the deployment script:
|
||||
|
||||
```bash
|
||||
./CICDpipeline.sh
|
||||
```
|
||||
|
||||
3. Follow the prompts:
|
||||
- Enter your **Ghaymah Project Name**
|
||||
- Enter your **App Name**
|
||||
3. Follow the prompts:
|
||||
- Enter your **Ghaymah Project Name**
|
||||
- Enter your **App Name**
|
||||
|
||||
4. If Ghaymah CLI is installed, the app will be deployed automatically.
|
||||
4. If Ghaymah CLI is installed, the app will be deployed automatically.
|
||||
|
||||
✅ Your app will be accessible at:
|
||||
✅ Your app will be accessible at:
|
||||
|
||||
```
|
||||
https://<your-app-name>.hosted.ghaymah.systems
|
||||
@@ -180,5 +180,3 @@ https://<your-app-name>.hosted.ghaymah.systems
|
||||
|
||||
## 🎥 Project Record
|
||||
[Watch the Demo](https://app.gitpasha.com/AhmedGamalYousef/Complete-CI-CD-Project-pipeline-on-Ghaymah-Cloud/src/branch/main/demo/CICDonGhaymahCloud.mp4)
|
||||
|
||||
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم