clickable logo
This commit is contained in:
parent
d4d5b38724
commit
286f2abae4
|
@ -108,14 +108,8 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- SECURITY_MODE=jwks
|
|
||||||
- BASE_URL=/
|
|
||||||
- KRATOS_BROWSER_URL=/.ory/kratos/public
|
|
||||||
- JWKS_URL=http://oathkeeper:4456/.well-known/jwks.json
|
|
||||||
- KRATOS_PUBLIC_URL=http://kratos:4433/
|
|
||||||
- KRATOS_ADMIN_URL=http://kratos:4434/
|
|
||||||
- SQA_OPT_OUT=true
|
|
||||||
- NEXT_PUBLIC_SKYNET_PORTAL_API=${SKYNET_PORTAL_API}
|
- NEXT_PUBLIC_SKYNET_PORTAL_API=${SKYNET_PORTAL_API}
|
||||||
|
- NEXT_PUBLIC_KRATOS_BROWSER_URL=${KRATOS_BROWSER_URL}
|
||||||
networks:
|
networks:
|
||||||
shared:
|
shared:
|
||||||
ipv4_address: 10.10.10.85
|
ipv4_address: 10.10.10.85
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
SKYNET_PORTAL_API=https://siasky.net
|
NEXT_PUBLIC_SKYNET_PORTAL_API=https://siasky.net
|
||||||
|
NEXT_PUBLIC_KRATOS_BROWSER_URL=https://secure.siasky.net/.ory/kratos/public
|
||||||
|
KRATOS_PUBLIC_URL=https://secure.siasky.net/.ory/kratos/public
|
||||||
|
|
|
@ -13,4 +13,4 @@ COPY styles ./styles
|
||||||
COPY postcss.config.js .
|
COPY postcss.config.js .
|
||||||
COPY tailwind.config.js .
|
COPY tailwind.config.js .
|
||||||
|
|
||||||
CMD ["sh", "-c", "env | grep NEXT_PUBLIC_ > .env.local && yarn build && yarn start"]
|
CMD ["sh", "-c", "env | grep -E 'NEXT_PUBLIC|KRATOS' > .env.local && yarn build && yarn start"]
|
||||||
|
|
|
@ -1,40 +1,11 @@
|
||||||
export const SECURITY_MODE_STANDALONE = "cookie";
|
|
||||||
export const SECURITY_MODE_JWT = "jwt";
|
|
||||||
|
|
||||||
const baseUrl = process.env.BASE_URL || "/";
|
|
||||||
|
|
||||||
let securityMode = SECURITY_MODE_STANDALONE;
|
|
||||||
let browserUrl = process.env.KRATOS_BROWSER_URL || "https://secure.siasky.xyz/.ory/kratos/public";
|
|
||||||
let publicUrl = process.env.KRATOS_PUBLIC_URL || "https://secure.siasky.xyz/.ory/kratos/public";
|
|
||||||
switch ((process.env.SECURITY_MODE || "").toLowerCase()) {
|
|
||||||
case "jwt":
|
|
||||||
case "oathkeeper":
|
|
||||||
securityMode = SECURITY_MODE_JWT;
|
|
||||||
break;
|
|
||||||
case "cookie":
|
|
||||||
case "standalone":
|
|
||||||
default:
|
|
||||||
securityMode = SECURITY_MODE_STANDALONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
// https://github.com/ory/kratos-selfservice-ui-node#configuration
|
||||||
kratos: {
|
kratos: {
|
||||||
browser: browserUrl.replace(/\/+$/, ""),
|
// The URL where ORY Kratos's Public API is located at. If this app and ORY Kratos are running in the same
|
||||||
admin: (process.env.KRATOS_ADMIN_URL || "").replace(/\/+$/, ""),
|
// private network, this should be the private network address (e.g. kratos-public.svc.cluster.local)
|
||||||
public: publicUrl.replace(/\/+$/, ""),
|
public: process.env.KRATOS_PUBLIC_URL.replace(/\/+$/, ""),
|
||||||
|
// The URL where ORY Kratos's public API is located, when accessible from the public internet via ORY Oathkeeper.
|
||||||
|
// This could be for example http://kratos.my-app.com/.
|
||||||
|
browser: process.env.NEXT_PUBLIC_KRATOS_BROWSER_URL.replace(/\/+$/, ""),
|
||||||
},
|
},
|
||||||
baseUrl,
|
|
||||||
jwksUrl: process.env.JWKS_URL || "/",
|
|
||||||
|
|
||||||
securityMode,
|
|
||||||
SECURITY_MODE_JWT,
|
|
||||||
SECURITY_MODE_STANDALONE,
|
|
||||||
|
|
||||||
https: {
|
|
||||||
enabled: process.env.hasOwnProperty("TLS_KEY_PATH") && process.env.hasOwnProperty("TLS_CERT_PATH"),
|
|
||||||
certificatePath: process.env.TLS_CERT_PATH || "",
|
|
||||||
keyPath: process.env.TLS_KEY_PATH || "",
|
|
||||||
},
|
|
||||||
|
|
||||||
tiers: {},
|
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue