-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change cadc-postgresql-dev to use Postgres15 / Remove previous versio…
…ns that do not build (centos)
- Loading branch information
Showing
15 changed files
with
2,633 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM fedora:40 | ||
|
||
# external URLs; allow --build-arg switch | ||
ARG PGDG=https://download.postgresql.org/pub/repos/yum/reporpms/F-40-x86_64/pgdg-fedora-repo-latest.noarch.rpm | ||
ARG PGSPHERE=https://ws-cadc.canfar.net/vault/files/pdowler/rpms/pgsphere15-1.4.2-1.fc40.x86_64.rpm | ||
|
||
# install repositories, server, extensions | ||
RUN dnf -y install ${PGDG} \ | ||
&& dnf -y install postgresql15-server postgresql15-contrib ${PGSPHERE} \ | ||
&& dnf -y clean all | ||
|
||
RUN mkdir -p /config /logs /var/lib/pgsql/15 | ||
COPY src/config/* /var/lib/pgsql/15/ | ||
COPY src/init/* /usr/local/bin/ | ||
|
||
COPY src/cadc-dev-postgresql-start /usr/bin/ | ||
CMD ["/usr/bin/cadc-dev-postgresql-start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# log to external | ||
LOGDIR=/logs | ||
LOG=$LOGDIR/do-init.log | ||
|
||
touch $LOG | ||
|
||
echo -n "START: " | ||
date | ||
|
||
INITDB=0 | ||
|
||
if [ -e /var/lib/pgsql/${PG}/data/postgresql.conf ]; then | ||
echo "do-init: detected existing setup... skipping database init" | ||
else | ||
INITDB=1 | ||
fi | ||
|
||
if [ $INITDB == 1 ]; then | ||
# change ownership of injected config files | ||
chown -R postgres:postgres /var/lib/pgsql/${PG}/* | ||
su -l postgres -c '/bin/bash /usr/local/bin/pgdb-init-postgres.sh' | ||
fi | ||
|
||
# start postgresql server | ||
su -l postgres -c '/usr/pgsql-15/bin/postmaster -D /var/lib/pgsql/15/data' > $LOGDIR/postgresql.log & | ||
|
||
sleep 6 | ||
if [ $INITDB == 1 ]; then | ||
if [ -e /config/init-content-schemas.sh ]; then | ||
cp /config/init-content-schemas.sh /usr/local/bin/ | ||
# 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" | ||
fi | ||
fi | ||
|
||
echo -n "init DONE: " | ||
date | ||
|
||
echo "waiting for postmaster to terminate..." | ||
wait | ||
echo "wait returned... exiting" |
42 changes: 0 additions & 42 deletions
42
docker/cadc-postgresql-dev/src/cadc-dev-postgresql-start-12
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.