-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
SET application_name="container_setup"; | ||
|
||
create extension postgis; | ||
create extension postgis_topology; | ||
create extension fuzzystrmatch; | ||
create extension postgis_tiger_geocoder; | ||
create extension pg_stat_statements; | ||
create extension pgaudit; | ||
|
||
alter user postgres password 'PG_ROOT_PASSWORD'; | ||
|
||
create user "PG_PRIMARY_USER" with REPLICATION PASSWORD 'PG_PRIMARY_PASSWORD'; | ||
create user "PG_USER" with password 'PG_PASSWORD'; | ||
|
||
create table primarytable (key varchar(20), value varchar(20)); | ||
grant all on primarytable to "PG_PRIMARY_USER"; | ||
|
||
create database "PG_DATABASE"; | ||
|
||
grant all privileges on database "PG_DATABASE" to "PG_USER"; | ||
|
||
\c "PG_DATABASE" | ||
|
||
create extension postgis; | ||
create extension postgis_topology; | ||
create extension fuzzystrmatch; | ||
create extension postgis_tiger_geocoder; | ||
create extension pg_stat_statements; | ||
create extension pgaudit; | ||
|
||
\c "PG_DATABASE" "PG_USER"; | ||
|
||
create schema "PG_USER"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
arg basever | ||
FROM percona/percona-postgresql-operator:${basever}-postgres | ||
ARG PG_MAJOR=14 | ||
ARG PGO_TAG=main | ||
ARG ORG_NAME=perconalab | ||
|
||
FROM ${ORG_NAME}/percona-postgresql-operator:${PGO_TAG}-ppg${PG_MAJOR} | ||
|
||
LABEL name="Percona PostgreSQL Distribution" \ | ||
vendor="Percona" \ | ||
summary="Percona Distribution for PostgreSQL" \ | ||
description="Percona Distribution for PostgreSQL is a collection of tools to assist you in managing your PostgreSQL database system" \ | ||
maintainer="Percona Development <[email protected]>" | ||
|
||
USER 0 | ||
|
||
COPY build/postgres-postgis/oracle-linux-ol8.repo /etc/yum.repos.d/ | ||
|
||
RUN set -ex; \ | ||
curl -Lf -o /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle https://yum.oracle.com/RPM-GPG-KEY-oracle-ol8; \ | ||
microdnf -y install epel-release; \ | ||
microdnf -y module disable postgresql; \ | ||
microdnf -y install percona-postgis33 percona-postgis33-client; | ||
microdnf -y --enablerepo="epel" install percona-postgis33 percona-postgis33-client | ||
|
||
EXPOSE 5432 | ||
|
||
COPY bin/postgres-gis /opt/crunchy/bin/postgres | ||
|
||
ENTRYPOINT ["/opt/crunchy/bin/uid_postgres.sh"] | ||
|
||
USER 26 | ||
|
||
CMD ["/opt/crunchy/bin/start.sh"] |