diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index d94a5e9..3e7a7d6 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,8 +1,11 @@ version: '3.1' services: postgres: - image: postgres:12 - restart: always + image: postgres:14 + command: > + -c ssl=on + -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem + -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ports: - 5432:5432 environment: diff --git a/docs/Getting-started.md b/docs/Getting-started.md index 7c71dd4..8a56bcf 100644 --- a/docs/Getting-started.md +++ b/docs/Getting-started.md @@ -88,7 +88,7 @@ cd docker; docker-compose up -d postgres ``` -This will start the latest PostgreSQL 12 with an empty database called `test`, +This will start the latest PostgreSQL 14 with an empty database called `test`, configured with the user `postgres` and password `secret`, listening in the default port 5432. @@ -103,6 +103,7 @@ RDBMSRepositoryProvider using: ( host: 'localhost'; port: 5432; databaseName: 'test'; + setSSL; yourself) ``` diff --git a/scripts/setup-MariaDB.sh b/scripts/setup-MariaDB.sh index d30cd5e..e2b4bb0 100755 --- a/scripts/setup-MariaDB.sh +++ b/scripts/setup-MariaDB.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -readonly DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -8) +DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -8) +readonly DOCKER_IMAGE_VERSION docker run -d -p 127.0.0.1:3306:3306 \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_DATABASE=test \ diff --git a/scripts/setup-MySQL.sh b/scripts/setup-MySQL.sh index 35b4f47..6f2f056 100755 --- a/scripts/setup-MySQL.sh +++ b/scripts/setup-MySQL.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -readonly DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -6) +DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -6) +readonly DOCKER_IMAGE_VERSION docker run -d -p 127.0.0.1:3306:3306 \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_ROOT_HOST=% \ diff --git a/scripts/setup-PostgreSQL.sh b/scripts/setup-PostgreSQL.sh index 0f9e401..00f6ee1 100755 --- a/scripts/setup-PostgreSQL.sh +++ b/scripts/setup-PostgreSQL.sh @@ -1,8 +1,12 @@ #!/usr/bin/env bash -readonly DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -11) +DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -11) +readonly DOCKER_IMAGE_VERSION docker run -d -p 127.0.0.1:5432:5432 \ -e POSTGRES_PASSWORD=secret \ -e POSTGRES_USER=postgres \ -e POSTGRES_DB=test \ - postgres:"$DOCKER_IMAGE_VERSION" + postgres:"$DOCKER_IMAGE_VERSION" \ + -c ssl=on \ + -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem \ + -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key diff --git a/source/Sagan-RDBMS-Tests/SingleSessionRDMBSRepositoryTest.class.st b/source/Sagan-RDBMS-Tests/SingleSessionRDMBSRepositoryTest.class.st index f99c394..c8ca142 100644 --- a/source/Sagan-RDBMS-Tests/SingleSessionRDMBSRepositoryTest.class.st +++ b/source/Sagan-RDBMS-Tests/SingleSessionRDMBSRepositoryTest.class.st @@ -60,6 +60,7 @@ SingleSessionRDMBSRepositoryTest class >> postgreSQLLogin [ host: 'localhost'; port: 5432; databaseName: 'test'; + setSSL; yourself ]