TSK-2185: upgrade postgres to version 14.7

This commit is contained in:
Elena Mokeeva 2023-03-22 11:36:59 +01:00 committed by Alex
parent 0197e42e9c
commit b2da5910d7
8 changed files with 25 additions and 25 deletions

View File

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Postgres" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="bash ./docker-databases/prepare_db.sh POSTGRES_10 &amp;&amp; exit" />
<option name="SCRIPT_TEXT" value="bash ./docker-databases/prepare_db.sh POSTGRES_14 &amp;&amp; exit" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />

View File

@ -43,7 +43,7 @@ public class DockerContainerCreator {
.withDatabaseName("TSKDB"));
case POSTGRES:
return Optional.of(
new PostgreSQLContainer<>(DockerImageName.parse("postgres:10"))
new PostgreSQLContainer<>(DockerImageName.parse("postgres:14.7"))
.withUsername("postgres")
.withPassword("postgres")
.withDatabaseName("postgres")
@ -52,7 +52,7 @@ public class DockerContainerCreator {
"-c",
"localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8 "
+ "&& export LANG=de_DE.UTF-8 "
+ "&& ./docker-entrypoint.sh postgres -c fsync=off")
+ "&& /usr/local/bin/docker-entrypoint.sh postgres -c fsync=off")
.waitingFor(
new LogMessageWaitStrategy()
.withRegEx(".*Datenbanksystem ist bereit, um Verbindungen anzunehmen.*\\s")

View File

@ -1,7 +1,7 @@
version: '3'
services:
taskana-postgres_10:
build: postgres_10
taskana-postgres_14:
build: postgres_14
ports:
- 5102:5432
environment:

View File

@ -1,3 +1,3 @@
FROM postgres:10
FROM postgres:14.7
RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
ENV LANG de_DE.utf8

View File

@ -10,8 +10,8 @@ SETLOCAL
ECHO 1 - Start DB2 11.5
ECHO 2 - Stop DB2 11.5
ECHO.
ECHO 3 - Start POSTGRES 10
ECHO 4 - Stop POSTGRES 10
ECHO 3 - Start POSTGRES 14
ECHO 4 - Stop POSTGRES 14
ECHO.
ECHO 5 - Start ORACLE 18
ECHO 6 - Stop ORACLE 18
@ -22,8 +22,8 @@ SETLOCAL
ECHO.
IF [%MENU%]==[1] GOTO START_DB2_11_5
IF [%MENU%]==[2] GOTO STOP_DB2_11_5
IF [%MENU%]==[3] GOTO START_POSTGRES_10
IF [%MENU%]==[4] GOTO STOP_POSTGRES_10
IF [%MENU%]==[3] GOTO START_POSTGRES_14
IF [%MENU%]==[4] GOTO STOP_POSTGRES_14
IF [%MENU%]==[5] GOTO START_ORACLE_18
IF [%MENU%]==[6] GOTO STOP_ORACLE_18
IF [%MENU%]==[7] GOTO STOP_ALL
@ -44,19 +44,19 @@ SETLOCAL
ECHO ---
GOTO MENU
:START_POSTGRES_10
:START_POSTGRES_14
ECHO ---
ECHO docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_10
docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_10
ECHO docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_14
docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_14
ECHO ---
GOTO MENU
:STOP_POSTGRES_10
:STOP_POSTGRES_14
ECHO ---
ECHO docker stop taskana-postgres_10
ECHO docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_10
docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_10
ECHO docker stop taskana-postgres_14
ECHO docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_14
docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_14
ECHO ---
GOTO MENU

View File

@ -19,7 +19,7 @@ export TOP_PID=$$
#H
#H database:
#H - DB2 | DB2_11_5
#H - POSTGRES | POSTGRES_10
#H - POSTGRES | POSTGRES_14
#H - ORACLE | ORACLE_18
# Arguments:
# $1: exit code
@ -37,8 +37,8 @@ function mapDBToDockerComposeServiceName() {
DB2|DB2_11_5)
echo "taskana-db2_11-5"
;;
POSTGRES|POSTGRES_10)
echo "taskana-postgres_10"
POSTGRES|POSTGRES_14)
echo "taskana-postgres_14"
;;
ORACLE|ORACLE_18)
echo "taskana-oracle-18"
@ -58,7 +58,7 @@ function main() {
DB2|DB2_11_5)
docker-compose -f $scriptDir/docker-compose.yml up -d "$(mapDBToDockerComposeServiceName "$1")"
;;
POSTGRES|POSTGRES_10)
POSTGRES|POSTGRES_14)
docker-compose -f $scriptDir/docker-compose.yml up -d "$(mapDBToDockerComposeServiceName "$1")"
;;
ORACLE|ORACLE_18)

View File

@ -43,7 +43,7 @@ public class DockerContainerCreator {
.withDatabaseName("TSKDB"));
case POSTGRES:
return Optional.of(
new PostgreSQLContainer<>(DockerImageName.parse("postgres:10"))
new PostgreSQLContainer<>(DockerImageName.parse("postgres:14.7"))
.withUsername("postgres")
.withPassword("postgres")
.withDatabaseName("postgres")
@ -52,7 +52,7 @@ public class DockerContainerCreator {
"-c",
"localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8 "
+ "&& export LANG=de_DE.UTF-8 "
+ "&& ./docker-entrypoint.sh postgres -c fsync=off")
+ "&& /usr/local/bin/docker-entrypoint.sh postgres -c fsync=off")
.waitingFor(
new LogMessageWaitStrategy()
.withRegEx(".*Datenbanksystem ist bereit, um Verbindungen anzunehmen.*\\s")

View File

@ -120,13 +120,13 @@ public class AbstractAccTest {
"cmd.exe",
"/c",
"docker-compose -f ../../docker-databases/docker-compose.yml up -d "
+ "taskana-postgres_10");
+ "taskana-postgres_14");
} else {
builder.command(
"sh",
"-c",
"docker-compose -f ../../docker-databases/docker-compose.yml up -d "
+ "taskana-postgres_10");
+ "taskana-postgres_14");
}
Process process = builder.start();
LOGGER.info("Starting POSTGRES...");