Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "Feat: add support for pg_trgm"" #7

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:13.8
FROM postgres:13

RUN apt-get update
RUN apt-get -y install postgresql-13-cron
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Postgres givethio

We needed a postgres docker image with enabled pg_cron so we wrote and publish this docker image
We needed a postgres docker image with enabled pg_cron and pg_trgm so we wrote and publish this docker image
to use it in https://github.com/Giveth/impact-graph

related PR in impact-graph https://github.com/Giveth/impact-graph/pull/658
Expand Down
5 changes: 2 additions & 3 deletions init-db/001-setup.sh → init-db/001-setup-pg_cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
# Remove last line "shared_preload_libraries='citus'"
sed -i '$ d' /var/lib/postgresql/data/pgdata/postgresql.conf
cat <<EOT >> /var/lib/postgresql/data/pgdata/postgresql.conf
shared_preload_libraries='pg_cron'
cron.database_name='givethio'
shared_preload_libraries = 'pg_cron,pg_trgm'
cron.database_name = 'givethio'
EOT
# Required to load pg_cron
pg_ctl restart

1 change: 1 addition & 0 deletions init-db/002-setup-pg_trgm.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE EXTENSION pg_trgm;