sentry报错wal2json.so没找到
sentry在安装的时候,github不通可能会碰到wal2json的错误,解决办法如下.
错误信息
DB not initialized. Postgres will take care of pg_hba
cp: cannot stat ‘/opt/sentry/wal2json/wal2json.so’: No such file or directory
解决办法
手动下载wal2json.so文件
wget --no-check-certificate https://github.com/getsentry/wal2json/releases/download/0.0.2/wal2json-Linux-x86_64-glibc.so
做一个镜像,把文件cp进去
dockerfile
FROM postgres:9.6
#COPY wal2json.so /opt/sentry/wal2json/wal2json.so
COPY wal2json.so /root/wal2json.so
打包镜像
docker build -t postgres:9.6cyty
修改postgres启动初始化脚本
vim /root/onpremise/postgres/postgres-entrypoint.sh
bind_wal2json() {
# Copy the file in the right place
#cp /opt/sentry/wal2json/wal2json.so `pg_config --pkglibdir`/wal2json.so #注释这行
cp /root/wal2json.so `pg_config --pkglibdir`/wal2json.so #增加这行
}
修改docker-compose.yml的镜像名
postgres:
<<: *restart_policy
image: "postgres:9.6cyty" #为自己刚刚build的