hasura skor 前邊有介紹過是一個挺不錯的event trigger 插件,咱們能夠用來進行事件通知處理
官方有提供構建的方法,可是有些仍是會有點問題,因此結合構建碰到的問題,修改下html
git clone https://github.com/hasura/skor.git
yum install -y libpqxx-devel libcurl-devel
說明: libpq 的安裝也能夠經過devel 包,這種通常出如今存在多版本pg 的狀況下
由於我電腦安裝了多個pg 版本,因此經過手工指定pg_config,可是我指定配置使用pg9.6git
配置PKG_CONFIG_PATHgithub
export PKG_CONFIG_PATH=/usr/pgsql-9.6/lib/pkgconfig
修改makefile,方便進行libpq 查找sql
project := skor
current_dir := $(shell pwd)
registry := hasura
CPPFLAGS += $(shell pkg-config --cflags libpq)
CPPLIBS += $(shell pkg-config --libs libpq)
version := 0.2
build_dir := $(current_dir)/build
skor: src/skor.c src/req.c
mkdir -p build
c99 $(CPPFLAGS) $(CPPLIBS) -O3 -Wall -Wextra -o build/skor src/skor.c src/log.c -lcurl
clean:
rm -rf build
image:
docker build -t $(registry)/$(project):$(version) .
https://github.com/hasura/skor
https://people.freedesktop.org/~dbn/pkg-config-guide.html
https://stackoverflow.com/questions/51498447/libpq-library-in-centos
https://serverfault.com/questions/316703/how-to-install-libpq-dev-on-centos-5-5docker