mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
minor updates
This commit is contained in:
parent
0e67cba484
commit
2f7569976a
4 changed files with 49 additions and 4 deletions
15
scripts/deploy.sh
Executable file
15
scripts/deploy.sh
Executable 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
17
scripts/hooks.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue