diff --git a/tox.ini b/tox.ini index bc74885..b848a35 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,8 @@ docker = docker: minio-vlc setenv = COVERAGE_FILE = .coverage.{envname} + PG_SSL_MODE = allow + allowlist_externals = poetry @@ -27,11 +29,12 @@ allowlist_externals = coverage [docker:db-vlc] -image = postgres:12 +image = postgres:16 environment = POSTGRES_USER=vlc POSTGRES_PASSWORD=test POSTGRES_DB=test_virtual_library_card_dev + expose = VLC_DEV_DB_PORT=5432/tcp host_var = diff --git a/virtual_library_card/settings/dev.py b/virtual_library_card/settings/dev.py index ff07581..ae17a91 100644 --- a/virtual_library_card/settings/dev.py +++ b/virtual_library_card/settings/dev.py @@ -22,7 +22,7 @@ "PASSWORD": "test", "HOST": os.environ.get("VLC_DEV_DB_HOST", "pg"), "PORT": os.environ.get("VLC_DEV_DB_PORT", "5432"), - "OPTIONS": {"sslmode": "require"}, + "OPTIONS": {"sslmode": os.environ.get("PG_SSL_MODE", "require")}, } }