Skip to content

Commit

Permalink
🔧 Automatically set settings of frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
jonastahl committed Oct 4, 2024
1 parent 84caccf commit dfb2dc3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
turnierplaner:
restart: on-failure:5
image: ghcr.io/secretj12/turnierplaner:0.0.2
image: ghcr.io/secretj12/turnierplaner:latest
container_name: turnierplaner-app
environment:
TURNIERPLANER_LANGUAGE: de
Expand All @@ -13,7 +13,8 @@ services:
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://turnierplaner_db/turnierplaner

QUARKUS_HTTP_CORS: "true"
QUARKUS_HTTP_CORS_ORIGINS: "*"
QUARKUS_HTTP_CORS_ORIGINS: "localhost:8080"
QUARKUS_HTTP_HOST: "localhost"
QUARKUS_HTTP_PORT: 8080

QUARKUS_OIDC_AUTH_SERVER_URL: http://keycloak:8080/realms/quarkus
Expand Down
22 changes: 17 additions & 5 deletions src/main/webui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/main/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@vee-validate/yup": "^4.13.2",
"@vue/cli": "^5.0.8",
"axios": "^1.7.7",
"dotenv": "^16.4.5",
"keycloak-js": "^23.0.3",
"material-symbols": "^0.23.0",
"oidc-client-ts": "^3.0.1",
Expand Down
12 changes: 7 additions & 5 deletions src/main/webui/src/settings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export const settings = {
AUTH_DOMAIN: "http://localhost:7777/realms/Quarkus",
FRONTEND: "http://localhost:8080",
BACKEND: "http://localhost:8080",
}
require('dotenv').config();

module.exports = {
AUTH_DOMAIN: process.env.QUARKUS_OIDC_AUTH_SERVER_URL || "http://localhost:7777/realms/Quarkus",
FRONTEND: process.env.QUARKUS_HTTP_HOST ? `${process.env.QUARKUS_HTTP_HOST}.${process.env.QUARKUS_HTTP_PORT}` : "http://localhost:2000",
BACKEND: process.env.QUARKUS_HTTP_HOST ? `${process.env.QUARKUS_HTTP_HOST}.${process.env.QUARKUS_HTTP_PORT}` : "http://localhost:2000",
};

0 comments on commit dfb2dc3

Please sign in to comment.