Skip to content

Commit

Permalink
Revert "Revert "Feat: add support for pg_trgm""
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi authored Feb 12, 2024
1 parent 62664da commit 57cfbfe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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;

0 comments on commit 57cfbfe

Please sign in to comment.