Attemp to add ntfy for push notifications
This commit is contained in:
parent
f23e7db2c9
commit
69eacfaf77
@ -104,3 +104,28 @@ jobs:
|
|||||||
docker compose up -d --remove-orphans
|
docker compose up -d --remove-orphans
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
notify:
|
||||||
|
- name: Wait for ntfy service to be healthy
|
||||||
|
run: |
|
||||||
|
ssh -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP '
|
||||||
|
echo "Waiting for ntfy container..."
|
||||||
|
for i in {1..30}; do
|
||||||
|
STATUS=$(docker inspect --format="{{json .State.Health.Status }}" ntfy)
|
||||||
|
if [[ $STATUS == "\"healthy\"" ]]; then
|
||||||
|
echo "ntfy is healthy!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "ntfy not ready yet ($STATUS). Retrying..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
echo "Error: ntfy did not become healthy in time."
|
||||||
|
exit 1
|
||||||
|
'
|
||||||
|
|
||||||
|
- name: Notify ntfy
|
||||||
|
run: |
|
||||||
|
curl -d "🚀 Deployment successful: $IMAGE_NAME:$GITHUB_SHA" \
|
||||||
|
https://ntfy.nicosaya.com/server-deploy
|
||||||
|
|
||||||
|
|
||||||
@ -18,3 +18,18 @@ services:
|
|||||||
- "3000:5173"
|
- "3000:5173"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
services:
|
||||||
|
ntfy:
|
||||||
|
image: binwiederhier/ntfy
|
||||||
|
ports:
|
||||||
|
- 8081:80
|
||||||
|
volumes:
|
||||||
|
- ./ntfy/cache:/var/cache/ntfy
|
||||||
|
- ./ntfy/etc:/etc/ntfy
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-qO-", "http://localhost/"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 10
|
||||||
Loading…
Reference in New Issue
Block a user