diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e6272ab45ef683c7cb076fd1c0144097a050a327..0aa3f13043ad07685dd401a2b557817f89542ecf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,14 @@
+variables:
+  # Configure postgres service (https://hub.docker.com/_/postgres/)
+  POSTGRES_DB: custom_db
+  POSTGRES_USER: custom_user
+  POSTGRES_PASSWORD: custom_pass
+
 before_script:
   - gem install bundler
   - bundle install --jobs $(nproc) --path=/cache/bundler
+  - unlink config/database.yml
+  - cp config/database.yml.gitlab config/database.yml
   - bundle exec rake db:create
 
 test: