diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 67f0f2713b327ba1e44f0ceddfa106ab36aafc3c..94bec1e66b97e1850321fd80943079c87d65253e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -168,7 +168,6 @@ behave-integration:
     PUBLIC_URL: "http://localhost:5000/"
     DATABASE_URL: "postgres://postgres:postgres@postgres/postgres"
     # For hydra & kratos
-    DSN: "postgres://hydra:hydra@postgres/hydra"
     # For hydra
     URLS_SELF_ISSUER: http://localhost/
     URLS_CONSENT: http://oidc:5000/login
diff --git a/hydra/Dockerfile b/hydra/Dockerfile
index 6044b908e3c31bf068de9bc6790bed4378bd0869..dd2862f0ef19d20da82f3ab066b88726a6e135f6 100644
--- a/hydra/Dockerfile
+++ b/hydra/Dockerfile
@@ -7,6 +7,7 @@
 
 FROM oryd/hydra:latest
 
+ENV DSN="postgres://hydra:hydra@postgres/hydra"
 
 #COPY identity.default.schema.json /etc/config/identity.default.schema.json
 #COPY kratos.yaml /etc/config/kratos.yaml
diff --git a/kratos/Dockerfile b/kratos/Dockerfile
index 3faf75279cddedafacb144322fcc60637854f690..cd2af48bde47c271f2174cda8c3f15a455fad781 100644
--- a/kratos/Dockerfile
+++ b/kratos/Dockerfile
@@ -7,7 +7,7 @@
 
 FROM oryd/kratos:latest-sqlite
 
-ENV DSN=memory
+ENV DSN="postgres://kratos:kratos@postgres/kratos"
 
 COPY identity.default.schema.json /etc/config/identity.default.schema.json
 COPY kratos.yaml /etc/config/kratos.yaml