minor updates

This commit is contained in:
Lep-Q 2025-03-27 11:33:51 +00:00
parent 0e67cba484
commit 2f7569976a
4 changed files with 49 additions and 4 deletions

15
scripts/deploy.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
set -e
cd ~/projects/omnivore
echo "[*] Pulling latest code from main..."
git pull origin main
echo "[*] Rebuilding services..."
docker-compose down
docker-compose pull
docker-compose up -d
echo "[✓] Deployment completed."

17
scripts/hooks.json Normal file
View file

@ -0,0 +1,17 @@
[
{
"id": "deploy",
"execute-command": "~/projects/omnivore/scripts/deploy.sh",
"command-working-directory": "~/projects/omnivore",
"trigger-rule": {
"match": {
"type": "payload-hash-sha1",
"secret": "webhooksecret",
"parameter": {
"source": "header",
"name": "X-Hub-Signature"
}
}
}
}
]

View file

@ -22,9 +22,6 @@ services:
migrate:
image: "ghcr.io/omnivore-app/sh-migrate:latest"
build:
context: .
dockerfile: ./packages/db/Dockerfile
container_name: "omnivore-migrate"
command: '/bin/sh ./packages/db/setup.sh'
env_file:
@ -146,6 +143,15 @@ services:
- omnivore-network
depends_on:
- nginx
webhook:
image: almir/webhook
container_name: omnivore-webhook
volumes:
- ~/projects/omnivore/scripts/hooks.json:/etc/webhook/hooks.json
ports:
- "9000:9000"
networks:
- omnivore-network
networks:
omnivore-network:

View file

@ -69,6 +69,13 @@ http {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /hooks/ {
proxy_pass http://localhost:9000/hooks/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
@ -77,4 +84,4 @@ http {
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
}
}
}