mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
feat: docker-compose for production frontend (#664)
* docker-compose for production frontend * fix: Remove external Redis port mapping for Coolify compatibility Redis should only be accessible within the internal Docker network in Coolify deployments to avoid port conflicts with other applications. * fix: Remove external port mapping for web service in Coolify Coolify handles port exposure through its proxy (Traefik), so services should not expose ports directly in the docker-compose file. * server side client envs * missing vars * nextjs experimental * fix claude 'fix' * remove build env vars compose * docker * remove ports for coolify * review * cleanup --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
export function isDevelopment() {
|
||||
return process.env.NEXT_PUBLIC_ENV === "development";
|
||||
}
|
||||
|
||||
// Function to calculate WCAG contrast ratio
|
||||
export const getContrastRatio = (
|
||||
foreground: [number, number, number],
|
||||
@@ -145,8 +141,15 @@ export const parseMaybeNonEmptyString = (
|
||||
s = trim ? s.trim() : s;
|
||||
return s.length > 0 ? (s as NonEmptyString) : null;
|
||||
};
|
||||
export const parseNonEmptyString = (s: string, trim = true): NonEmptyString =>
|
||||
assertExists(parseMaybeNonEmptyString(s, trim), "Expected non-empty string");
|
||||
export const parseNonEmptyString = (
|
||||
s: string,
|
||||
trim = true,
|
||||
e?: string,
|
||||
): NonEmptyString =>
|
||||
assertExists(
|
||||
parseMaybeNonEmptyString(s, trim),
|
||||
"Expected non-empty string" + (e ? `: ${e}` : ""),
|
||||
);
|
||||
|
||||
export const assertExists = <T>(
|
||||
value: T | null | undefined,
|
||||
@@ -173,4 +176,8 @@ export const assertExistsAndNonEmptyString = (
|
||||
value: string | null | undefined,
|
||||
err?: string,
|
||||
): NonEmptyString =>
|
||||
parseNonEmptyString(assertExists(value, err || "Expected non-empty string"));
|
||||
parseNonEmptyString(
|
||||
assertExists(value, err || "Expected non-empty string"),
|
||||
true,
|
||||
err,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user