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