-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from jembi/fix/docker-image-build-for-production
Fix/docker image build for production
- Loading branch information
Showing
36 changed files
with
556 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
POSTGRES_DB=replaceme | ||
POSTGRES_USER=replaceme | ||
POSTGRES_PASSWORD=replaceme | ||
KEYCLOAK_ADMIN_PASSWORD=replaceme | ||
KEYCLOAK_ADMIN=replaceme | ||
EXTERNAL_URL=replaceme | ||
PRISMA_FIELD_ENCRYPTION_KEY=k1.aesgcm256.DbQoar8ZLuUsOHZNyrnjlskInHDYlzF3q6y1KGM7DUN= | ||
PRISMA_FIELD_ENCRYPTION_HASH_SALT=replaceme | ||
PRISMA_FIELD_ENCRYPTION_HASH_SALT=0be97e77063ea3f7a0f128b06ef9b1eg | ||
POSTGRES_DB=postgres | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=postgres | ||
EXTERNAL_URL=http://localhost:3001 | ||
KEYCLOAK_ADMIN=admin | ||
KEYCLOAK_ADMIN_PASSWORD=password | ||
KEYCLOAK_CLIENT_ID="nextjs" | ||
KEYCLOAK_CLIENT_SECRET="gX0nfIp57bO3bY68br3kdTXung2Auwpr" | ||
KEYCLOAK_ISSUER="http://localhost:8082/realms/shlp" | ||
NEXTAUTH_URL="http://localhost:3000" | ||
NEXTAUTH_SECRET="ArmMS4LBmH3VTR77UrSAY2lPs04HO0Nk2/4BcU0jMvc=" | ||
NEXT_CONTAINER_KEYCLOAK_ENDPOINT="http://localhost:8082" | ||
NEXT_LOCAL_KEYCLOAK_URL="http://localhost:8082" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,7 @@ | ||
import NextAuth, { AuthOptions } from "next-auth"; | ||
import KeycloakProvider from "next-auth/providers/keycloak"; | ||
import NextAuth from 'next-auth'; | ||
|
||
import { authOptions } from '../authOptions'; | ||
|
||
export const authOptions: AuthOptions = { | ||
providers: [ | ||
KeycloakProvider({ | ||
jwks_endpoint: `${process.env.NEXT_CONTAINER_KEYCLOAK_ENDPOINT}/realms/shlp/protocol/openid-connect/certs`, | ||
wellKnown: undefined, | ||
clientId: process.env.KEYCLOAK_CLIENT_ID, | ||
clientSecret: process.env.KEYCLOAK_CLIENT_SECRET, | ||
issuer: process.env.KEYCLOAK_ISSUER, | ||
authorization: { | ||
params: { | ||
scope: "openid email profile", | ||
}, | ||
url: `${process.env.NEXT_LOCAL_KEYCLOAK_URL}/realms/shlp/protocol/openid-connect/auth`, | ||
}, | ||
token: `${process.env.NEXT_CONTAINER_KEYCLOAK_ENDPOINT}/realms/shlp/protocol/openid-connect/token`, | ||
userinfo: `${process.env.NEXT_CONTAINER_KEYCLOAK_ENDPOINT}/realms/shlp/protocol/openid-connect/userinfo`, | ||
}), | ||
], | ||
callbacks: { | ||
session: async({session, token, user}) => { | ||
return {...session, token, user}; | ||
} | ||
} | ||
}; | ||
const handler = NextAuth(authOptions); | ||
|
||
export { handler as GET, handler as POST }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.