Record live Ghaymah deployments

هذا الالتزام موجود في:
yassinelagamy
2026-07-26 19:56:02 +03:00
الأصل 8bc563fa6b
التزام 8ce7e9a6cf
6 ملفات معدلة مع 193 إضافات و30 حذوفات

عرض الملف

@@ -94,9 +94,8 @@ docker ps --filter name=ghaymah-api
## 3. Push the image and deploy on Ghaymah
Ghaymah deploys a container from a **public image URL**, so the image must live in
a public registry first. Docker Hub is used here — replace `<MY_DOCKERHUB_USER>`
with your own account name.
Ghaymah deploys a container from a container image URL. This deployment uses
Docker Hub namespace `agamy74`.
### 3.1 Push to Docker Hub
@@ -105,17 +104,17 @@ docker login
```
```bash
docker tag ghaymah-api:latest docker.io/<MY_DOCKERHUB_USER>/ghaymah-api:latest
docker tag ghaymah-api:latest docker.io/agamy74/ghaymah-api:latest
```
```bash
docker push docker.io/<MY_DOCKERHUB_USER>/ghaymah-api:latest
docker push docker.io/agamy74/ghaymah-api:latest
```
> Building on an Apple Silicon / ARM machine? Build for the platform Ghaymah runs
> (`linux/amd64`) or the container will fail to start:
> ```bash
> docker buildx build --platform linux/amd64 -t docker.io/<MY_DOCKERHUB_USER>/ghaymah-api:latest --push ./q1-deploy-monitor/app
> docker buildx build --platform linux/amd64 -t docker.io/agamy74/ghaymah-api:latest --push ./q1-deploy-monitor/app
> ```
Make sure the Docker Hub repository is **public** — Ghaymah pulls the image
@@ -125,7 +124,7 @@ anonymously from the URL you paste in.
| Field | Value |
|---|---|
| Container Image URL | `docker.io/<MY_DOCKERHUB_USER>/ghaymah-api:latest` |
| Container Image URL | `docker.io/agamy74/ghaymah-api:8bc563f` |
| Application Name | `ghaymah-api` |
| Port Number | `8080` (must match the `EXPOSE`d port) |
| Public Access | **enabled** |
@@ -137,12 +136,12 @@ service a public URL.
### 3.3 Verify the live deployment
```bash
curl -f <the public URL Ghaymah assigns>/health
curl -f https://ghaymah-api-615e99f13665.hosted.ghaymah.systems/health
```
Expected: HTTP 200 with `{"status":"ok","uptime_s":...,"timestamp":"..."}`.
Also open `<the public URL Ghaymah assigns>/docs` in a browser for the OpenAPI page,
Also open `https://ghaymah-api-615e99f13665.hosted.ghaymah.systems/docs` in a browser for the OpenAPI page,
and screenshot both the running service in the Ghaymah dashboard and the `/health`
response for the submission.
@@ -157,14 +156,14 @@ response for the submission.
`monitor/monitor.py` uses the **Python standard library only** — nothing to install.
```bash
export APP_URL="<the public URL Ghaymah assigns>"
export APP_URL="https://ghaymah-api-615e99f13665.hosted.ghaymah.systems"
python q1-deploy-monitor/monitor/monitor.py
```
On Windows PowerShell:
```bash
$env:APP_URL="<the public URL Ghaymah assigns>"; python q1-deploy-monitor\monitor\monitor.py
$env:APP_URL="https://ghaymah-api-615e99f13665.hosted.ghaymah.systems"; python q1-deploy-monitor\monitor\monitor.py
```
Every 30 seconds it issues `GET $APP_URL/health` with a 5 s timeout, then
@@ -191,7 +190,7 @@ Every 30 seconds it issues `GET $APP_URL/health` with a 5 s timeout, then
Single check (useful for cron, CI or a smoke test — exits `0` if up, `1` if down):
```bash
APP_URL="<the public URL Ghaymah assigns>" python q1-deploy-monitor/monitor/monitor.py --once
APP_URL="https://ghaymah-api-615e99f13665.hosted.ghaymah.systems" python q1-deploy-monitor/monitor/monitor.py --once
```
Leave the loop running well before the submission so the dashboard has real history.

عرض الملف

@@ -621,5 +621,159 @@
"code": 200,
"latency_ms": 34.65,
"requests": 271
},
{
"ts": "2026-07-26T16:45:29.326567+00:00",
"status": "up",
"code": 200,
"latency_ms": 84.06,
"requests": 274
},
{
"ts": "2026-07-26T16:45:59.647988+00:00",
"status": "up",
"code": 200,
"latency_ms": 10.29,
"requests": 277
},
{
"ts": "2026-07-26T16:46:29.737515+00:00",
"status": "up",
"code": 200,
"latency_ms": 43.92,
"requests": 280
},
{
"ts": "2026-07-26T16:46:59.782486+00:00",
"status": "up",
"code": 200,
"latency_ms": 10.3,
"requests": 283
},
{
"ts": "2026-07-26T16:47:29.834008+00:00",
"status": "up",
"code": 200,
"latency_ms": 10.92,
"requests": 286
},
{
"ts": "2026-07-26T16:47:59.870760+00:00",
"status": "up",
"code": 200,
"latency_ms": 9.37,
"requests": 289
},
{
"ts": "2026-07-26T16:48:29.934518+00:00",
"status": "up",
"code": 200,
"latency_ms": 29.9,
"requests": 292
},
{
"ts": "2026-07-26T16:48:59.977842+00:00",
"status": "up",
"code": 200,
"latency_ms": 8.75,
"requests": 295
},
{
"ts": "2026-07-26T16:49:30.015612+00:00",
"status": "up",
"code": 200,
"latency_ms": 9.01,
"requests": 298
},
{
"ts": "2026-07-26T16:50:00.063894+00:00",
"status": "up",
"code": 200,
"latency_ms": 17.94,
"requests": 301
},
{
"ts": "2026-07-26T16:50:30.100475+00:00",
"status": "up",
"code": 200,
"latency_ms": 10.24,
"requests": 304
},
{
"ts": "2026-07-26T16:51:00.130652+00:00",
"status": "up",
"code": 200,
"latency_ms": 7.38,
"requests": 307
},
{
"ts": "2026-07-26T16:51:30.170066+00:00",
"status": "up",
"code": 200,
"latency_ms": 10.55,
"requests": 310
},
{
"ts": "2026-07-26T16:52:00.206236+00:00",
"status": "up",
"code": 200,
"latency_ms": 8.8,
"requests": 313
},
{
"ts": "2026-07-26T16:52:30.243868+00:00",
"status": "up",
"code": 200,
"latency_ms": 9.16,
"requests": 316
},
{
"ts": "2026-07-26T16:53:00.280182+00:00",
"status": "up",
"code": 200,
"latency_ms": 8.18,
"requests": 319
},
{
"ts": "2026-07-26T16:53:30.318350+00:00",
"status": "up",
"code": 200,
"latency_ms": 9.65,
"requests": 322
},
{
"ts": "2026-07-26T16:54:00.352722+00:00",
"status": "up",
"code": 200,
"latency_ms": 7.37,
"requests": 325
},
{
"ts": "2026-07-26T16:54:30.386202+00:00",
"status": "up",
"code": 200,
"latency_ms": 9.6,
"requests": 328
},
{
"ts": "2026-07-26T16:55:00.423153+00:00",
"status": "up",
"code": 200,
"latency_ms": 9.31,
"requests": 331
},
{
"ts": "2026-07-26T16:55:30.455631+00:00",
"status": "up",
"code": 200,
"latency_ms": 7.77,
"requests": 334
},
{
"ts": "2026-07-26T16:55:37.840122+00:00",
"status": "up",
"code": 200,
"latency_ms": 1117.87,
"requests": 6
}
]