diff --git a/CHANGELOG.md b/CHANGELOG.md index cd6a922..0ab6d95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ Find changes for the upcoming release in the project's [changelog.d](https://git + + +## 1.18.2 (2024-07-12) + +## Fixed + +- Fix Postgres data database init scripts + ## 1.18.1 (2024-07-11) diff --git a/docker/cadc-postgresql-dev/src/cadc-dev-postgresql-start b/docker/cadc-postgresql-dev/src/cadc-dev-postgresql-start index d74995a..6bbdac9 100755 --- a/docker/cadc-postgresql-dev/src/cadc-dev-postgresql-start +++ b/docker/cadc-postgresql-dev/src/cadc-dev-postgresql-start @@ -28,12 +28,11 @@ su -l postgres -c '/usr/pgsql-15/bin/postmaster -D /var/lib/pgsql/15/data' > $LO sleep 6 if [ $INITDB == 1 ]; then - if [ -e /config/init-content-schemas.sh ]; then - cp /config/init-content-schemas.sh /usr/local/bin/ + if [ -e /usr/local/bin/init-content-schemas.sh ]; then # create standard user(s), database(s), schema(s) su -l postgres -c '/bin/bash /usr/local/bin/pgdb-init-content.sh' else - echo "not found: /config/init-content-schemas.sh" + echo "not found: /usr/local/bin/init-content-schemas.sh" fi fi diff --git a/docker/cadc-postgresql-dev/src/init/init-content-schemas.sh b/docker/cadc-postgresql-dev/src/init/init-content-schemas.sh new file mode 100755 index 0000000..1a4032c --- /dev/null +++ b/docker/cadc-postgresql-dev/src/init/init-content-schemas.sh @@ -0,0 +1,2 @@ +CATALOGS="db1 db2" +SCHEMAS="schema1 schema2" diff --git a/docker/cadc-postgresql-dev/src/init/pgdb-init-postgres.sh b/docker/cadc-postgresql-dev/src/init/pgdb-init-postgres.sh index ef5cab8..ced7c47 100755 --- a/docker/cadc-postgresql-dev/src/init/pgdb-init-postgres.sh +++ b/docker/cadc-postgresql-dev/src/init/pgdb-init-postgres.sh @@ -1,2552 +1,15 @@ +#!/bin/bash +## this script runs on the container (as postgres) before the postgres server starts ## +VER=15 +PGBASE=/var/lib/pgsql/$VER +/usr/pgsql-${VER}/bin/initdb -D $PGBASE/data --encoding=UTF8 --lc-collate=C --lc-ctype=C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - docker-base/cadc-postgresql-dev/src/init/pgdb-init-postgres.sh at 213f29ca0f2b1221d297aae49a6f47b15e4d4039 · opencadc/docker-base · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- Skip to content - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
- -
- - - - - - - - -
- - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - - - - -
- -
- -
- -
- - - - / - - docker-base - - - Public -
- - -
- -
- - -
-
- -
-
- - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - -

Latest commit

 

History

History
executable file
·
16 lines (11 loc) · 427 Bytes

pgdb-init-postgres.sh

File metadata and controls

executable file
·
16 lines (11 loc) · 427 Bytes
-
- - - - -
- -
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - -
- -
-
- - - +## modified config files are provided by the container in the $PGBASE dir +for cf in $PGBASE/*.conf; do + FNAME=$(basename $cf) + \rm -f $PGBASE/data/$FNAME + ln -s $cf $PGBASE/data/$FNAME +done