Complete Ghaymah SRE Technical Assessment

هذا الالتزام موجود في:
2026-07-28 05:23:23 +03:00
التزام 77ac0fb7fc
1365 ملفات معدلة مع 255081 إضافات و0 حذوفات

47
q3-cicd/.github/workflows/workflow.yml مباع Normal file
عرض الملف

@@ -0,0 +1,47 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Ghaymah Container Registry
run: |
echo "Login to Ghaymah Registry"
# ghaymah login
- name: Build Docker Image
run: |
docker build -t ghaymah-api:latest .
- name: Tag Docker Image
run: |
docker tag ghaymah-api:latest registry.ghaymah.systems/ghaymah-api:latest
- name: Push Docker Image
run: |
docker push registry.ghaymah.systems/ghaymah-api:latest
deploy-production:
needs: build
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Deploy to Production
run: |
echo "Deploying application..."

37
q3-cicd/ghaymah-cli.md Normal file
عرض الملف

@@ -0,0 +1,37 @@
# Ghaymah CLI Integration
## Install Ghaymah CLI
```bash
curl -sSl https://cli.ghaymah.systems/install.sh | bash
```
---
## Initialize an Application
```bash
gy resource app init -p <project_id>
```
This command initializes a new application inside an existing Ghaymah project.
---
## Deploy the Application
Ensure a Dockerfile exists in the project directory, then run:
```bash
gy resource app launch
```
The CLI builds the Docker image and deploys the application to Ghaymah Cloud.
---
## Notes
- A Project must be created before initializing an application.
- The Dockerfile must exist in the project directory.
- Application settings are stored in `.ghaymah.json`..

عرض الملف

@@ -0,0 +1,34 @@
# Staging vs Production
## Staging Environment
The staging environment is used for testing the application before releasing it to production.
Characteristics:
- Used by developers and testers.
- Simulates the production environment.
- Safe place to test new features.
- Failures do not affect real users.
---
## Production Environment
The production environment is the live environment used by customers.
Characteristics:
- Serves real users.
- Requires high availability.
- Changes should be approved before deployment.
- Monitoring and alerting must always be enabled.
---
## Key Differences
| Staging | Production |
|----------|------------|
| Testing | Live Environment |
| Internal Users | Real Customers |
| Safe to Experiment | Stable and Reliable |
| Bugs are Acceptable | Bugs Must Be Minimized |