forked from pgjdbc/r2dbc-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.bash
executable file
·18 lines (17 loc) · 898 Bytes
/
test.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
docker run -it \
-e "POSTGRES_USER=test" \
-e "POSTGRES_PASSWORD=test" \
-e "POSTGRES_DB=test" \
--mount type=bind,source="$(pwd)/src/test/resources/server.crt",target=/var/server.crt \
--mount type=bind,source="$(pwd)/src/test/resources/server.key",target=/var/server.key \
--mount type=bind,source="$(pwd)/src/test/resources/client.crt",target=/var/client.crt \
--mount type=bind,source="$(pwd)/src/test/resources/pg_hba.conf",target=/var/pg_hba.conf \
--mount type=bind,source="$(pwd)/src/test/resources/setup.sh",target=/var/setup.sh \
--mount type=bind,source="$(pwd)/src/test/resources/test-db-init-script.sql",target=/docker-entrypoint-initdb.d/test-db-init-script.sql \
postgres:11.1 \
-c 'ssl=on' \
-c 'ssl_key_file=/var/server.key' \
-c 'ssl_cert_file=/var/server.crt' \
-c 'ssl_ca_file=/var/client.crt' \
-c 'hba_file=/var/pg_hba.conf'