Skip to content

Commit

Permalink
Add init script for sample data / fix bug with init scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stvoutsin committed Jul 13, 2024
1 parent d63295d commit 840cf4b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2,551 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Find changes for the upcoming release in the project's [changelog.d](https://git

<!-- scriv-insert-here -->


<a id='changelog-1.18.2'></a>
## 1.18.2 (2024-07-12)

## Fixed

- Fix Postgres data database init scripts

<a id='changelog-1.18.1'></a>
## 1.18.1 (2024-07-11)

Expand Down
5 changes: 2 additions & 3 deletions docker/cadc-postgresql-dev/src/cadc-dev-postgresql-start
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions docker/cadc-postgresql-dev/src/init/init-content-schemas.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CATALOGS="db1 db2"
SCHEMAS="schema1 schema2"
Loading

0 comments on commit 840cf4b

Please sign in to comment.