fix(fullstack): Use platform linux/amd64 for image building, some env var fixes

This commit is contained in:
2025-11-16 08:56:38 +01:00
parent af4dc3b7d8
commit 8d42254ac7
5 changed files with 20 additions and 21 deletions

View File

@@ -100,6 +100,7 @@ jobs:
context: .
file: ./legalconsenthub-backend/Dockerfile
push: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -94,6 +94,7 @@ jobs:
context: .
file: ./legalconsenthub/Dockerfile
push: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -3,11 +3,10 @@ spring:
name: legalconsenthub
datasource:
hikari:
auto-commit: false
url: jdbc:h2:mem:legalconsenthub-database
username: user
password: pw
auto-commit: false
url: ${LEGALCONSENTHUB_DB_URL}
username: ${LEGALCONSENTHUB_DB_APP_USER}
password: ${LEGALCONSENTHUB_DB_PASSWORD}
jpa:
show-sql: true
@@ -36,5 +35,5 @@ spring:
oauth2:
resourceserver:
jwt:
issuer-uri: http://localhost:7080/realms/legalconsenthub
jwk-set-uri: http://localhost:7080/realms/legalconsenthub/protocol/openid-connect/certs
issuer-uri: ${SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI}
jwk-set-uri: ${SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI}

View File

@@ -6,7 +6,8 @@ export default defineNuxtConfig({
public: {
clientProxyBasePath: 'NOT_SET',
serverApiBaseUrl: 'NOT_SET',
serverApiBasePath: 'NOT_SET'
serverApiBasePath: 'NOT_SET',
keycloakTokenUrl: 'http://localhost:7080/realms/legalconsenthub/protocol/openid-connect/token'
},
oauth: {
keycloak: {

View File

@@ -11,19 +11,16 @@ export default eventHandler(async (event) => {
}
try {
const { access_token, refresh_token } = await $fetch<OAuthTokenResponse>(
`http://localhost:7080/realms/legalconsenthub/protocol/openid-connect/token`,
{
method: 'POST',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'refresh_token',
client_id: config.oauth.keycloak.clientId,
client_secret: config.oauth.keycloak.clientSecret,
refresh_token: session.jwt.refreshToken
}).toString()
}
)
const { access_token, refresh_token } = await $fetch<OAuthTokenResponse>(config.public.keycloakTokenUrl, {
method: 'POST',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'refresh_token',
client_id: config.oauth.keycloak.clientId,
client_secret: config.oauth.keycloak.clientSecret,
refresh_token: session.jwt.refreshToken
}).toString()
})
await setUserSession(event, {
jwt: {