mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 21:01:45 +03:00
ssl dockercompose test config
This commit is contained in:
parent
d1fe026639
commit
ae8e0709d7
@ -72,6 +72,7 @@ services:
|
|||||||
- PGPASSWORD=postgres
|
- PGPASSWORD=postgres
|
||||||
volumes:
|
volumes:
|
||||||
- ./tests/fixtures:/fixtures
|
- ./tests/fixtures:/fixtures
|
||||||
|
- ./tests/fixtures/initdb-dc-ssl.sh:/docker-entrypoint-initdb.d/10_martin.sh
|
||||||
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
||||||
|
|
||||||
db-legacy:
|
db-legacy:
|
||||||
|
17
tests/fixtures/initdb-dc-ssl.sh
vendored
Executable file
17
tests/fixtures/initdb-dc-ssl.sh
vendored
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
mv /var/lib/postgresql/data/pg_hba.conf /var/lib/postgresql/data/pg_hba.conf.bak
|
||||||
|
cat > /var/lib/postgresql/data/pg_hba.conf <<EOF
|
||||||
|
# TYPE DATABASE USER ADDRESS METHOD
|
||||||
|
|
||||||
|
# "local" is for Unix domain socket connections only
|
||||||
|
#local all all trust
|
||||||
|
|
||||||
|
# localhost connections
|
||||||
|
#host all all 127.0.0.1/32 trust
|
||||||
|
|
||||||
|
# external connections
|
||||||
|
hostssl all all all scram-sha-256
|
||||||
|
|
||||||
|
EOF
|
1
tests/fixtures/initdb.sh
vendored
1
tests/fixtures/initdb.sh
vendored
@ -38,4 +38,5 @@ echo -e "\n\n\n"
|
|||||||
echo "################################################################################################"
|
echo "################################################################################################"
|
||||||
echo "Active pg_hba.conf configuration"
|
echo "Active pg_hba.conf configuration"
|
||||||
echo "################################################################################################"
|
echo "################################################################################################"
|
||||||
|
psql -P pager=off -v ON_ERROR_STOP=1 -c "select pg_reload_conf();"
|
||||||
psql -P pager=off -v ON_ERROR_STOP=1 -c "select * from pg_hba_file_rules;"
|
psql -P pager=off -v ON_ERROR_STOP=1 -c "select * from pg_hba_file_rules;"
|
||||||
|
Loading…
Reference in New Issue
Block a user