-
Notifications
You must be signed in to change notification settings - Fork 14
[WIP] Rebase to postgresql 15 #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bdunne
wants to merge
1
commit into
ManageIQ:master
Choose a base branch
from
bdunne:pg_15
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -20,16 +20,16 @@ FROM registry.access.redhat.com/ubi8/s2i-core AS base | |
|
|
||
| # PostgreSQL image for OpenShift. | ||
| # Volumes: | ||
| # * /var/lib/psql/data - Database cluster for PostgreSQL | ||
| # * /var/lib/pgsql/data - Database cluster for PostgreSQL | ||
| # Environment: | ||
| # * $POSTGRESQL_USER - Database user name | ||
| # * $POSTGRESQL_PASSWORD - User's password | ||
| # * $POSTGRESQL_DATABASE - Name of the database to create | ||
| # * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres' | ||
| # PostgreSQL administrative account | ||
|
|
||
| ENV POSTGRESQL_VERSION=13 \ | ||
| POSTGRESQL_PREV_VERSION=10 \ | ||
| ENV POSTGRESQL_VERSION=15 \ | ||
| POSTGRESQL_PREV_VERSION=13 \ | ||
| HOME=/var/lib/pgsql \ | ||
| PGUSER=postgres \ | ||
| APP_DATA=/opt/app-root | ||
|
|
@@ -42,36 +42,37 @@ create, run, maintain and access a PostgreSQL DBMS server." | |
| LABEL summary="$SUMMARY" \ | ||
| description="$DESCRIPTION" \ | ||
| io.k8s.description="$DESCRIPTION" \ | ||
| io.k8s.display-name="PostgreSQL 13" \ | ||
| io.k8s.display-name="PostgreSQL 15" \ | ||
| io.openshift.expose-services="5432:postgresql" \ | ||
| io.openshift.tags="database,postgresql,postgresql13,postgresql-13" \ | ||
| io.openshift.tags="database,postgresql,postgresql15,postgresql-15" \ | ||
| io.openshift.s2i.assemble-user="26" \ | ||
| name="rhel8/postgresql-13" \ | ||
| com.redhat.component="postgresql-13-container" \ | ||
| name="rhel8/postgresql-15" \ | ||
| com.redhat.component="postgresql-15-container" \ | ||
| version="1" \ | ||
| com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \ | ||
| usage="podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel8/postgresql-13" \ | ||
| usage="podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel8/postgresql-15" \ | ||
| maintainer="SoftwareCollections.org <[email protected]>" | ||
|
|
||
| EXPOSE 5432 | ||
|
|
||
| COPY --from=postgresql_container_source /postgresql-container/13/root/usr/libexec/fix-permissions /usr/libexec/fix-permissions | ||
| COPY --from=postgresql_container_source /postgresql-container/15/root/usr/libexec/fix-permissions /usr/libexec/fix-permissions | ||
|
|
||
| # This image must forever use UID 26 for postgres user so our volumes are | ||
| # safe in the future. This should *never* change, the last test is there | ||
| # to make sure of that. | ||
| RUN ARCH=$(uname -m) && \ | ||
| if [ "$(uname -m)" != "s390x" ]; then \ | ||
| yum -y --setopt=tsflags=nodocs install \ | ||
| http://mirror.centos.org/centos/8-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-8-2.el8.noarch.rpm \ | ||
| http://mirror.centos.org/centos/8-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm; \ | ||
| http://mirror.centos.org/centos/8-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-8-6.el8.noarch.rpm \ | ||
| http://mirror.centos.org/centos/8-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-8-6.el8.noarch.rpm; \ | ||
| fi && \ | ||
| yum -y module enable postgresql:13 && \ | ||
| INSTALL_PKGS="postgresql-server postgresql-contrib rsync tar gettext bind-utils nss_wrapper" && \ | ||
| yum -y module enable postgresql:15 && \ | ||
| INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper postgresql-server postgresql-contrib" && \ | ||
| INSTALL_PKGS="$INSTALL_PKGS pgaudit" && \ | ||
| yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \ | ||
| rpm -V $INSTALL_PKGS && \ | ||
| yum -y update tzdata && \ | ||
| yum -y reinstall tzdata && \ | ||
| postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \ | ||
| (yum -y reinstall tzdata || yum -y update tzdata ) && \ | ||
| yum -y clean all --enablerepo='*' && \ | ||
| localedef -f UTF-8 -i en_US en_US.UTF-8 && \ | ||
| chmod -R g+w /etc/pki/tls && \ | ||
|
|
@@ -83,8 +84,8 @@ RUN ARCH=$(uname -m) && \ | |
| ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \ | ||
| ENABLED_COLLECTIONS= | ||
|
|
||
| COPY --from=postgresql_container_source /postgresql-container/13/root / | ||
| COPY --from=postgresql_container_source /postgresql-container/13/s2i/bin/ $STI_SCRIPTS_PATH | ||
| COPY --from=postgresql_container_source /postgresql-container/15/root / | ||
| COPY --from=postgresql_container_source /postgresql-container/15/s2i/bin/ $STI_SCRIPTS_PATH | ||
|
|
||
| # Not using VOLUME statement since it's not working in OpenShift Online: | ||
| # https://github.com/sclorg/httpd-container/issues/30 | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a typo or did the dir actually change?