fix(fullstack): Use platform linux/amd64 for image building, some env var fixes
This commit is contained in:
@@ -100,6 +100,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./legalconsenthub-backend/Dockerfile
|
file: ./legalconsenthub-backend/Dockerfile
|
||||||
push: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
|
push: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
|
||||||
|
platforms: linux/amd64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./legalconsenthub/Dockerfile
|
file: ./legalconsenthub/Dockerfile
|
||||||
push: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
|
push: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
|
||||||
|
platforms: linux/amd64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ spring:
|
|||||||
name: legalconsenthub
|
name: legalconsenthub
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
hikari:
|
auto-commit: false
|
||||||
auto-commit: false
|
url: ${LEGALCONSENTHUB_DB_URL}
|
||||||
url: jdbc:h2:mem:legalconsenthub-database
|
username: ${LEGALCONSENTHUB_DB_APP_USER}
|
||||||
username: user
|
password: ${LEGALCONSENTHUB_DB_PASSWORD}
|
||||||
password: pw
|
|
||||||
|
|
||||||
jpa:
|
jpa:
|
||||||
show-sql: true
|
show-sql: true
|
||||||
@@ -36,5 +35,5 @@ spring:
|
|||||||
oauth2:
|
oauth2:
|
||||||
resourceserver:
|
resourceserver:
|
||||||
jwt:
|
jwt:
|
||||||
issuer-uri: http://localhost:7080/realms/legalconsenthub
|
issuer-uri: ${SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI}
|
||||||
jwk-set-uri: http://localhost:7080/realms/legalconsenthub/protocol/openid-connect/certs
|
jwk-set-uri: ${SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ export default defineNuxtConfig({
|
|||||||
public: {
|
public: {
|
||||||
clientProxyBasePath: 'NOT_SET',
|
clientProxyBasePath: 'NOT_SET',
|
||||||
serverApiBaseUrl: 'NOT_SET',
|
serverApiBaseUrl: 'NOT_SET',
|
||||||
serverApiBasePath: 'NOT_SET'
|
serverApiBasePath: 'NOT_SET',
|
||||||
|
keycloakTokenUrl: 'http://localhost:7080/realms/legalconsenthub/protocol/openid-connect/token'
|
||||||
},
|
},
|
||||||
oauth: {
|
oauth: {
|
||||||
keycloak: {
|
keycloak: {
|
||||||
|
|||||||
@@ -11,19 +11,16 @@ export default eventHandler(async (event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { access_token, refresh_token } = await $fetch<OAuthTokenResponse>(
|
const { access_token, refresh_token } = await $fetch<OAuthTokenResponse>(config.public.keycloakTokenUrl, {
|
||||||
`http://localhost:7080/realms/legalconsenthub/protocol/openid-connect/token`,
|
method: 'POST',
|
||||||
{
|
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
||||||
method: 'POST',
|
body: new URLSearchParams({
|
||||||
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
grant_type: 'refresh_token',
|
||||||
body: new URLSearchParams({
|
client_id: config.oauth.keycloak.clientId,
|
||||||
grant_type: 'refresh_token',
|
client_secret: config.oauth.keycloak.clientSecret,
|
||||||
client_id: config.oauth.keycloak.clientId,
|
refresh_token: session.jwt.refreshToken
|
||||||
client_secret: config.oauth.keycloak.clientSecret,
|
}).toString()
|
||||||
refresh_token: session.jwt.refreshToken
|
})
|
||||||
}).toString()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
await setUserSession(event, {
|
await setUserSession(event, {
|
||||||
jwt: {
|
jwt: {
|
||||||
|
|||||||
Reference in New Issue
Block a user