Skip to content

Commit 3d4712f

Browse files
committed
Add webhook stuff to infra
1 parent 7705d36 commit 3d4712f

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,6 @@ nohup.out
183183
tests/.jmeter*
184184
dbs/
185185
*.pid
186+
187+
# Show be an executable of the webhook server
188+
infra/webhook

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,11 @@ fix: check-venv ## Run code formatters
9595

9696
watch-sass:
9797
@/bin/find -type d -name 'scss' -not -path '*/staticfiles/*' | xargs -P 0 -l -i bash -c 'sass --watch "$$1:$${1:0:-5}/css"' - '{}'
98+
99+
#########
100+
# Infra #
101+
#########
102+
103+
webhook-server:
104+
cd infra
105+
nohup ./webhook -hooks hooks.yaml -verbose &

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
![image](https://user-images.githubusercontent.com/18076967/131153731-0196375e-b650-4b0f-b188-f20b2eba37f1.png)
66

77

8+
## Notes
9+
10+
- Postgres 15+ is mandatory for NULLS NOT DISTINCT indexes
11+
- [webhook-server](https://github.com/adnanh/webhook/releases)
12+
813
## Installation requirements
914

1015
- PostgreSQL(and `libpq-dev`)

infra/hooks.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- id: redeploy-webhook
2+
execute-command: "../scripts/redeploy-hook.sh"
3+
command-working-directory: "./"

scripts/redeploy-hook.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
# Script to redeploy data stuff and rq worker. Used by server's webhook server on push
4+
5+
git fetch --all
6+
git reset --hard "origin/$(git branch --show-current)"
7+
docker-compose --profile prod up -d --build && docker-compose stop web

0 commit comments

Comments
 (0)