diff --git a/Dockerfile b/Dockerfile index 3a7f833..170bcae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,7 @@ ENV POETRY_HOME="/etc/poetry" # required for postgres ssl: the crt file doesn't exist # but the path must point to a visible directory otherwise we # get a permissions error -ENV PGSSLCERT /tmp/postgresql.crt +ENV PGSSLCERT=/tmp/postgresql.crt RUN set -x \ && addgroup -g 101 -S nginx \ diff --git a/README.md b/README.md index c87a06e..d3edd70 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ will be served from the linked package, rather than the CDN. To install the registry locally, you'll need the following: -- PostgreSQL 12+ +- PostgreSQL 16+ - PostGIS 3 - Python 3.8+ (3.9 is the build target for the Docker install) - Appropriate system dependencies to build the Python dependencies, which may include: @@ -159,6 +159,12 @@ CREATE EXTENSION postgis; \c simplified_registry_test CREATE EXTENSION fuzzystrmatch; CREATE EXTENSION postgis; + +\c simplified_registry_dev postgres +GRANT ALL ON SCHEMA public TO simplified; + +\c simplified_registry_test postgres +GRANT ALL ON SCHEMA public TO simplified; ``` The database configuration is exposed to the application via environment variables. diff --git a/docker-compose.yml b/docker-compose.yml index 6a7ce54..953152f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,6 +29,8 @@ services: - "80:80" environment: - SIMPLIFIED_TEST_DATABASE=postgresql://simplified_test:simplified_test@libreg_local_db:5433/simplified_registry_test + # AWS RDS Postgres 16+ enables SSL by default so we require ssl here in order to mirror the production environment + # as closely as possible for our dev instance. - SIMPLIFIED_PRODUCTION_DATABASE=postgresql://simplified:simplified@libreg_local_db:5433/simplified_registry_dev?sslmode=require - FLASK_ENV=development - AWS_ACCESS_KEY_ID=TEST diff --git a/poetry.lock b/poetry.lock index a398729..b308556 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2360,4 +2360,4 @@ pg-binary = [] [metadata] lock-version = "2.0" python-versions = ">=3.8,<4" -content-hash = "e6d1c8bab4c1740b60bbea77949e02c94ddbeb8133ddaeb93969ff18c65b0d83" +content-hash = "fbe65fbe26d8d9754d6e17f9bdbd77df4cd0a8938d55bc5cde2b1331a3c8bdf4" diff --git a/pyproject.toml b/pyproject.toml index db7a3d3..4c66565 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,6 @@ Pillow = "*" pycryptodome = "*" PyJWT = "*" python = ">=3.8,<4" -pyyaml = ">=6.0.2" requests = "2.31.0" SQLAlchemy = "^1.4" uszipcode = "==1.0.1" diff --git a/tox.ini b/tox.ini index eb810b8..219421a 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ docker = allowlist_externals = poetry [docker:db-registry] -image = postgis/postgis:12-3.1 +image = postgis/postgis:16-3.5 environment = POSTGRES_USER=simplified_test POSTGRES_PASSWORD=test