diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5566ff566a24b84e38afe05369a17d92b7729298..a48b0c14df99540aa5f04bbdca61c29b49d1b1bf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,7 +14,8 @@ run-tox-pipeline:
image: python:3.10
services:
- - postgres:latest
+ - name: postgres:15.4
+ alias: postgres
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
@@ -22,7 +23,7 @@ run-tox-pipeline:
POSTGRES_DB: postgres
POSTGRES_USER: nwa
POSTGRES_PASSWORD: nwa
- DATABASE_URL: 'postgresql://nwa:nwa@localhost:5432/postgres'
+ DATABASE_URI_TEST: 'postgresql://nwa:nwa@postgres:5432/postgres'
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages