-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to get around SCL Postgres container limitations
- Loading branch information
1 parent
5e21bfc
commit 3f2059e
Showing
14 changed files
with
72 additions
and
26 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
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
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
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,5 +1,9 @@ | ||
#!/bin/sh | ||
|
||
echo "attempting to install required pg_trgm extension" | ||
|
||
psql -d $POSTGRESQL_DATABASE -c 'CREATE EXTENSION pg_trgm;' | ||
while true; do | ||
sleep 10 | ||
echo "attempting to create pg_trgm extension" | ||
psql -d $POSTGRESQL_DATABASE -h $POSTGRESQL_DATABASE -U postgres -c 'CREATE EXTENSION pg_trgm;' || true | ||
echo "succesfully created pg_trgm extension" | ||
break | ||
done |
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,35 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: quay-postgres-init | ||
spec: | ||
template: | ||
metadata: | ||
name: quay-postgres-init | ||
spec: | ||
restartPolicy: Never | ||
securityContext: | ||
fsGroup: 0 | ||
volumes: | ||
- name: postgres-bootstrap | ||
secret: | ||
secretName: postgres-bootstrap | ||
defaultMode: 0777 | ||
items: | ||
- key: create-extensions.sh | ||
path: create-extensions.sh | ||
- key: restore.sh | ||
path: restore.sh | ||
containers: | ||
- name: quay-postgres-init | ||
image: postgres:latest | ||
command: | ||
- /opt/app-root/src/docker-entrypoint-initdb.d/create-extensions.sh | ||
env: | ||
- name: POSTGRESQL_DATABASE | ||
value: $(POSTGRES_DEPLOYMENT_NAME) | ||
- name: PGPASSWORD | ||
value: postgres | ||
volumeMounts: | ||
- name: postgres-bootstrap | ||
mountPath: /opt/app-root/src/docker-entrypoint-initdb.d |
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
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
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
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
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
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
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
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
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