Skip to content

Commit

Permalink
Changed postgres:15 to quay.io/sclorg/postgresql-15-c9s
Browse files Browse the repository at this point in the history
  • Loading branch information
john-westcott-iv committed Aug 10, 2023
1 parent 98c0e5a commit c82743b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
7 changes: 4 additions & 3 deletions awx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,12 @@ def manage():
from django.conf import settings
from django.core.management import execute_from_command_line

# enforce the postgres version is equal to 15. if not, then terminate program with exit code of 1
# enforce the postgres version is a minimum of 12 (we need this for partitioning); if not, then terminate program with exit code of 1
# In the future if we require a feature of a version of postgres > 12 this should be updated to reflect that.
# The return of connection.pg_version is something like 12013
if not os.getenv('SKIP_PG_VERSION_CHECK', False) and not MODE == 'development':
if (connection.pg_version // 10000) < 15:
sys.stderr.write("Postgres version 15 is required\n")
if (connection.pg_version // 10000) < 12:
sys.stderr.write("At a minimum, postgres version 12 is required\n")
sys.exit(1)

if len(sys.argv) >= 2 and sys.argv[1] in ('version', '--version'): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion tools/ansible/roles/dockerfile/templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ RUN for dir in \
/var/lib/awx/.local/share/containers/storage \
/var/run/awx-rsyslog \
/var/log/nginx \
/var/lib/postgresql \
/var/lib/pgsql \
/var/run/supervisor \
/var/run/awx-receptor \
/var/lib/nginx ; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,16 @@ services:
# context: ./docker-compose
# dockerfile: Dockerfile-logstash
postgres:
image: postgres:15
image: quay.io/sclorg/postgresql-15-c9s
container_name: tools_postgres_1
# additional logging settings for postgres can be found https://www.postgresql.org/docs/current/runtime-config-logging.html
command: postgres -c log_destination=stderr -c log_min_messages=info -c log_min_duration_statement={{ pg_log_min_duration_statement|default(1000) }} -c max_connections={{ pg_max_connections|default(1024) }}
command: run-postgresql -c log_destination=stderr -c log_min_messages=info -c log_min_duration_statement={{ pg_log_min_duration_statement|default(1000) }} -c max_connections={{ pg_max_connections|default(1024) }}
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: {{ pg_username }}
POSTGRES_DB: {{ pg_database }}
POSTGRES_PASSWORD: {{ pg_password }}
POSTGRESQL_USER: {{ pg_username }}
POSTGRESQL_DATABASE: {{ pg_database }}
POSTGRESQL_PASSWORD: {{ pg_password }}
volumes:
- "awx_db_15:/var/lib/postgresql/data"
- "awx_db_15:/var/lib/pgsql/data"
{% if enable_pgbouncer|bool %}
pgbouncer:
image: bitnami/pgbouncer:latest
Expand Down

0 comments on commit c82743b

Please sign in to comment.