75 أسطر
1.2 KiB
Markdown
75 أسطر
1.2 KiB
Markdown
# CI/CD Pipeline Documentation
|
|
|
|
## 1. Staging Environment
|
|
|
|
The staging environment is used to test new application versions before releasing them to users.
|
|
|
|
Characteristics:
|
|
|
|
- Used by developers and testers.
|
|
- Contains test data.
|
|
- Safe for debugging.
|
|
- Frequent deployments are allowed.
|
|
|
|
---
|
|
|
|
## 2. Production Environment
|
|
|
|
The production environment is the live environment used by real users.
|
|
|
|
Characteristics:
|
|
|
|
- Contains real user data.
|
|
- High availability is required.
|
|
- Stable and secure.
|
|
- Every deployment requires manual approval.
|
|
|
|
---
|
|
|
|
## 3. Staging vs Production
|
|
|
|
| Staging | Production |
|
|
|----------|------------|
|
|
| Testing environment | Live environment |
|
|
| Test data | Real data |
|
|
| Developers/Testers | End users |
|
|
| Frequent changes | Controlled releases |
|
|
|
|
---
|
|
|
|
## 4. Ghaymah CLI Integration
|
|
|
|
Example deployment steps:
|
|
|
|
### Login
|
|
|
|
```bash
|
|
ghaymah login
|
|
```
|
|
|
|
### Login to Container Registry
|
|
|
|
```bash
|
|
ghaymah registry login
|
|
```
|
|
|
|
### Build Docker Image
|
|
|
|
```bash
|
|
docker build -t my-api .
|
|
```
|
|
|
|
### Push Docker Image
|
|
|
|
```bash
|
|
docker push registry.ghaymah.systems/my-api:latest
|
|
```
|
|
|
|
### Deploy Application
|
|
|
|
```bash
|
|
ghaymah deploy my-api
|
|
```
|
|
|
|
> Note: The exact CLI commands may vary depending on the installed version of the Ghaymah CLI.
|