From 6097be3c79ea7eb3b4228f825ca3375f77b8ea57 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Thu, 3 Apr 2025 08:31:25 +0200 Subject: [PATCH] test(backend): Omgevingsvariabelen files --- backend/.env.staging | 21 +++++++++++++++++++++ backend/.env.test | 14 ++++++++++++-- backend/.env.test.example | 13 ------------- compose.staging.yml | 2 +- 4 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 backend/.env.staging delete mode 100644 backend/.env.test.example diff --git a/backend/.env.staging b/backend/.env.staging new file mode 100644 index 00000000..bedfb0b7 --- /dev/null +++ b/backend/.env.staging @@ -0,0 +1,21 @@ +PORT=3000 +DWENGO_DB_HOST=db +DWENGO_DB_PORT=5432 +DWENGO_DB_USERNAME=postgres +DWENGO_DB_PASSWORD=postgres +DWENGO_DB_UPDATE=false + +DWENGO_AUTH_STUDENT_URL=http://localhost/idp/realms/student +DWENGO_AUTH_STUDENT_CLIENT_ID=dwengo +DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://idp:7080/idp/realms/student/protocol/openid-connect/certs +DWENGO_AUTH_TEACHER_URL=http://localhost/idp/realms/teacher +DWENGO_AUTH_TEACHER_CLIENT_ID=dwengo +DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://idp:7080/idp/realms/teacher/protocol/openid-connect/certs + +# Allow Vite dev-server to access the backend (for testing purposes). Don't forget to remove this in production! +#DWENGO_CORS_ALLOWED_ORIGINS=http://localhost/,127.0.0.1:80,http://127.0.0.1,http://localhost:80,http://127.0.0.1:80,localhost +DWENGO_CORS_ALLOWED_ORIGINS=http://localhost/*,http://idp:7080,https://idp:7080 + +# Logging and monitoring + +LOKI_HOST=http://logging:3102 diff --git a/backend/.env.test b/backend/.env.test index b8a81003..535628cd 100644 --- a/backend/.env.test +++ b/backend/.env.test @@ -1,3 +1,13 @@ -PORT=3000 -DWENGO_DB_UPDATE=true +# +# Test environment configuration +# +# Should not need to be modified. +# See .env.example for more information. +# + +### Dwengo ### + +DWENGO_PORT=3000 + DWENGO_DB_NAME=":memory:" +DWENGO_DB_UPDATE=true diff --git a/backend/.env.test.example b/backend/.env.test.example deleted file mode 100644 index 535628cd..00000000 --- a/backend/.env.test.example +++ /dev/null @@ -1,13 +0,0 @@ -# -# Test environment configuration -# -# Should not need to be modified. -# See .env.example for more information. -# - -### Dwengo ### - -DWENGO_PORT=3000 - -DWENGO_DB_NAME=":memory:" -DWENGO_DB_UPDATE=true diff --git a/compose.staging.yml b/compose.staging.yml index 8357e773..16814b77 100644 --- a/compose.staging.yml +++ b/compose.staging.yml @@ -24,7 +24,7 @@ services: - '3000:3000/tcp' restart: unless-stopped volumes: - - ./backend/.env:/app/.env + - ./backend/.env.staging:/app/.env depends_on: - db - logging