From 8bd3ec97bec4cc57f80b57e0ef64d1602ebdd083 Mon Sep 17 00:00:00 2001
From: Mart van Santen <mart@greenhost.nl>
Date: Wed, 1 Dec 2021 07:37:33 +0100
Subject: [PATCH] Change URLs of images and moved to enviroment

---
 .gitlab-ci.yml                | 24 ++++++++++++------------
 .gitlab/ci/kratos/kratos.yaml | 14 +++++++-------
 login/Dockerfile              | 14 +++++++-------
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1ceda7e..c3900ea 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -167,29 +167,29 @@ behave-integration:
     # interconnection. Requires gitlab-runner v12.9.0
     FF_NETWORK_PER_BUILD: 1
     OAUTHLIB_INSECURE_TRANSPORT: "true"
-    # For login panel
-    FLASK_RUN_HOST: "0.0.0.0"
-    FLASK_RUN_PORT: "5000"
-    HYDRA_ADMIN_URL: "http://hydra:4445"
-    KRATOS_PUBLIC_URL: "http://kratos:4433"
-    KRATOS_ADMIN_URL: "http://kratos:4434"
-    PUBLIC_URL: "http://localhost:5000/"
-    DATABASE_URL: "postgres://postgres:postgres@postgres/postgres"
     # For hydra
-    URLS_SELF_ISSUER: http://localhost/
+    URLS_SELF_ISSUER: http://hydra:4445/
     URLS_CONSENT: http://oidc:5000/login
     URLS_LOGIN: http://oidc:5000/consent
+    SECRETS_SYSTEM: RandomSecretForTesting
     # For postgres image
     POSTGRES_PASSWORD: postgres
     POSTGRES_USER: postgres
     POSTGRES_DB: postgres
+    # For Login image
+    FLASK_RUN_HOST: "0.0.0.0"
+    FLASK_RUN_PORT: "5000"
+    PUBLIC_URL: "http://localhost:5000/"
+    HYDRA_ADMIN_URL: "http://hydra:4445"
+    KRATOS_PUBLIC_URL: "http://kratos:4433"
+    KRATOS_ADMIN_URL: "http://kratos:4434"
+    DATABASE_URL: "postgresql://stackspin:stackspin@localhost/stackspin"
+    APP_SETTINGS: "config.DevelopmentConfig"
     # General flask
     DEBUG: "true"
     FLASK_ENV: "development"
-    # Others and old
+    # For sso test app
     BASE_URL: "http://hydra:4444/"
-    HYDRA_ADMIN_URL: "http://hydra:4445"
-    # General
     KEY: "testapp"
     SECRET: "secret"
   image: ${CI_REGISTRY_IMAGE}/behave:${CI_COMMIT_REF_NAME}
diff --git a/.gitlab/ci/kratos/kratos.yaml b/.gitlab/ci/kratos/kratos.yaml
index bc9e929..11bdc0c 100644
--- a/.gitlab/ci/kratos/kratos.yaml
+++ b/.gitlab/ci/kratos/kratos.yaml
@@ -11,18 +11,18 @@ identity:
 log:
   level: info
 selfservice:
-  default_browser_return_url: http://localhost/login/login
+  default_browser_return_url: http://oidc:5000/login
   flows:
     login:
-      ui_url: http://localhost/login/login
+      ui_url: http://oidc:5000/login
     recovery:
       enabled: true
       lifespan: 15m
-      ui_url: http://localhost/login/recovery
-    registration:
-      ui_url: http://localhost/login/registration
+      ui_url: http://oidc:5000/recovery
+#    registration:
+#      ui_url: http://oidc:5000/registration
     settings:
-      ui_url: http://localhost/login/settings
+      ui_url: http://oidc:500/settings
   methods:
     link:
       enabled: true
@@ -36,5 +36,5 @@ serve:
   admin:
     port: 4434
   public:
-    base_url: http://localhost/api/
+    base_url: http://kratos:4433/
     port: 4433
diff --git a/login/Dockerfile b/login/Dockerfile
index ad70a03..de9abf6 100644
--- a/login/Dockerfile
+++ b/login/Dockerfile
@@ -10,12 +10,12 @@ RUN pip install --no-cache-dir -r requirements.txt
 
 EXPOSE 5000
 
-ENV FLASK_RUN_HOST=0.0.0.0
-ENV FLASK_RUN_PORT=5000
-ENV HYDRA_ADMIN_URL=http://localhost:4445
-ENV KRATOS_PUBLIC_URL=http://localhost:8080
-ENV KRATOS_ADMIN_URL=http://localhost:8000
-ENV DATABASE_URL="postgresql://stackspin:stackspin@localhost/stackspin"
-ENV APP_SETTINGS="config.DevelopmentConfig"
+#ENV FLASK_RUN_HOST=0.0.0.0
+#ENV FLASK_RUN_PORT=5000
+#ENV HYDRA_ADMIN_URL=http://localhost:4445
+#ENV KRATOS_PUBLIC_URL=http://localhost:8080
+#ENV KRATOS_ADMIN_URL=http://localhost:8000
+#ENV DATABASE_URL="postgresql://stackspin:stackspin@localhost/stackspin"
+#ENV APP_SETTINGS="config.DevelopmentConfig"
 
 CMD [ "flask", "run" ]
-- 
GitLab