-
Notifications
You must be signed in to change notification settings - Fork 46
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
3 changed files
with
39 additions
and
0 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,15 @@ | ||
#!/bin/bash | ||
|
||
cat > /var/lib/postgresql/data/pg_hba.conf <<EOF | ||
host pg8000_md5 all 0.0.0.0/0 md5 | ||
host pg8000_gss all 0.0.0.0/0 gss | ||
host pg8000_password all 0.0.0.0/0 password | ||
host pg8000_scram_sha_256 all 0.0.0.0/0 scram-sha-256 | ||
host all all 0.0.0.0/0 trust | ||
EOF | ||
|
||
# Create a user and database with the same name as the "outside" user, | ||
#in order for code in readme.md tests to work | ||
|
||
createuser "${OUTSIDE_USER}" | ||
createdb "${OUTSIDE_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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ALTER SYSTEM SET ssl = on; | ||
ALTER SYSTEM SET ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'; | ||
ALTER SYSTEM SET ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'; | ||
ALTER SYSTEM SET password_encryption = 'scram-sha-256'; | ||
ALTER SYSTEM SET log_statement = 'all'; | ||
CREATE EXTENSION hstore; | ||
|
||
CREATE DATABASE pg8000_gss; |
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,16 @@ | ||
#!/bin/bash | ||
|
||
# This script will fire up a local postgresql test server using podman | ||
|
||
base_path=$(dirname "$0") | ||
|
||
podman run \ | ||
--interactive \ | ||
--tty \ | ||
--rm \ | ||
--publish 127.0.0.1:5432:5432 \ | ||
--env POSTGRES_PASSWORD=pw \ | ||
--env OUTSIDE_USER="$USER" \ | ||
--mount type=bind,source="$base_path/init-scripts",target=/docker-entrypoint-initdb.d \ | ||
--name pg8000-test-server \ | ||
docker.io/library/postgres:latest "$@" |