From 8f3ea49795e9140100b8af4a99cbf55bc3c26e5e Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Sat, 5 Oct 2024 13:11:16 +0200 Subject: [PATCH] - Now use server-mga9:1.1.3 image, - Variabilization of external server ports in env & compose file, - Now use docker_tools for .env building. --- Dockerfile | 3 +-- ReleaseNotes.txt | 12 +++++++++++- compose.yaml | 6 +++--- .env => env | 10 ++++++++-- var/lib/pgsql/.gitignore | 4 ++++ 5 files changed, 27 insertions(+), 8 deletions(-) rename .env => env (82%) create mode 100644 var/lib/pgsql/.gitignore diff --git a/Dockerfile b/Dockerfile index 849dd49..a99a387 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG IMG_URL_PREFIX="rx3" -FROM ${IMG_URL_PREFIX}/server-mga9:1.1.2 +FROM ${IMG_URL_PREFIX}/server-mga9:1.1.3 ARG IMG_NAME ARG IMG_FULL_NAME @@ -54,7 +54,6 @@ then fi' #--------------------------------------------------------------------------------------------------- -#command=/usr/bin/pg_ctl start -D '${POSTGRESQL_DATA}' -s -o "-p '${POSTGRESQL_PORT}'" -w -t 300 \n\ #--------------------------------------------------------------------------------------------------- ARG POSTGRESQLD_INI='[program:postgresqld] \n\ command=/usr/bin/postgres -D '${POSTGRESQL_DATA}' -p '${POSTGRESQL_PORT}' \n\ diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 92b5925..15bddd0 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,13 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3/PostgreSQL-Mga9 V 1.0.2 - A. GIBERT - 2024/10/05 +------------------------------------------------------------------------------------------------------------------------------------ + +- Now use server-mga9:1.1.3 image, +- Variabilization of external server ports in env & compose file, +- Now use docker_tools for .env building. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3/PostgreSQL-Mga9 V 1.0.1 - A. GIBERT - 2024/08/31 ------------------------------------------------------------------------------------------------------------------------------------ @@ -12,4 +22,4 @@ Rx3/PostgreSQL-Mga9 V 1.0.0 - A. GIBERT - 2024/08/30 ------------------------------------------------------------------------------------------------------------------------------------ - Initial release, -- Based on server-mga9:1.1.2 image. +- Based on rx3/server-mga9:1.1.2 image. diff --git a/compose.yaml b/compose.yaml index 03ce402..9cb77a3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -30,10 +30,10 @@ services: POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD} volumes: - - ./pgsql-data:/var/lib/pgsql/data + - ./var/lib/pgsql/data:/var/lib/pgsql/data network_mode: bridge ports: - - "127.0.0.1:9013:9001" - - "127.0.0.1:8032:5432" + - "127.0.0.1:${DATABASE_SV_PORT}:9001" + - "127.0.0.1:${DATABASE_PORT}:5432" diff --git a/.env b/env similarity index 82% rename from .env rename to env index 099c513..cc2d16c 100644 --- a/.env +++ b/env @@ -16,8 +16,8 @@ IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}" #------------------------------------------------------------------------------- IMG_NAME="postgresql-mga9" -IMG_FULL_NAME="Rx3 MariaDB Mageia-9 Docker Image" -IMG_VERSION="1.0.1" +IMG_FULL_NAME="Rx3 PostgreSQL Mageia-9 Docker Image" +IMG_VERSION="1.0.2" IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" IMG_MAINTAINER='"Arnaud G. GIBERT" ' @@ -27,6 +27,12 @@ IMG_MAINTAINER='"Arnaud G. GIBERT" ' # User Settings #------------------------------------------------------------------------------- +ENV_PORT_OFFSET=0 +SV_PORT_OFFSET=1000 + +DATABASE_PORT=$(( 8032 + ${ENV_PORT_OFFSET})) +DATABASE_SV_PORT=$(( ${DATABASE_PORT} + ${SV_PORT_OFFSET})) + POSTGRESQL_UID=971 POSTGRESQL_GID=971 POSTGRESQL_POSTGRES_PASSWORD="postgresadmin" diff --git a/var/lib/pgsql/.gitignore b/var/lib/pgsql/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/lib/pgsql/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore