Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ FROM base AS builder
ARG OTEL_EXPORTER_OTLP_ENDPOINT
ARG OTEL_SERVICE_NAME
ARG IS_LOCAL_MODE
ARG IS_SELF_HOSTED_MODE
ENV NEXT_PUBLIC_OTEL_EXPORTER_OTLP_ENDPOINT $OTEL_EXPORTER_OTLP_ENDPOINT
ENV NEXT_PUBLIC_OTEL_SERVICE_NAME $OTEL_SERVICE_NAME
ENV NEXT_PUBLIC_IS_LOCAL_MODE $IS_LOCAL_MODE
ENV NEXT_PUBLIC_IS_SELF_HOSTED_MODE ${IS_SELF_HOSTED_MODE}
ENV NX_DAEMON false

COPY ./packages/app/src ./packages/app/src
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/AppNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
AppNavLink,
AppNavUserMenu,
} from './AppNav.components';
import { IS_K8S_DASHBOARD_ENABLED, IS_LOCAL_MODE } from './config';
import { IS_K8S_DASHBOARD_ENABLED, IS_LOCAL_MODE, IS_SELF_HOSTED_MODE } from './config';
import Icon from './Icon';
import InstallInstructionModal from './InstallInstructionsModal';
import Logo from './Logo';
Expand Down Expand Up @@ -850,7 +850,7 @@ export default function AppNav({ fixed = false }: { fixed?: boolean }) {
className="px-3 mb-2 mt-4"
>
<OnboardingChecklist onAddDataClick={openInstallInstructions} />
<AppNavCloudBanner />
{!IS_SELF_HOSTED_MODE && <AppNavCloudBanner />}
</div>
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/AuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function AuthPage({ action }: { action: 'register' | 'login' }) {
const isLoggedIn = Boolean(!teamIsLoading && team && !team.isDemo);

useEffect(() => {
if (isLoggedIn) {
if (isLoggedIn || IS_SELF_HOSTED_MODE) {
router.push('/search');
}
}, [isLoggedIn, router]);
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from 'next/router';

import api from '@/api';
import AuthLoadingBlocker from '@/AuthLoadingBlocker';
import { IS_LOCAL_MODE } from '@/config';
import { IS_LOCAL_MODE, IS_SELF_HOSTED_MODE } from '@/config';

export default function LandingPage() {
const { data: installation, isLoading: installationIsLoading } =
Expand All @@ -14,7 +14,7 @@ export default function LandingPage() {
const isLoggedIn = Boolean(!teamIsLoading && team);

useEffect(() => {
if (isLoggedIn || IS_LOCAL_MODE) {
if (isLoggedIn || IS_LOCAL_MODE || IS_SELF_HOSTED_MODE) {
router.push('/search');
}
}, [isLoggedIn, router]);
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const IS_LOCAL_MODE = //true;
// @ts-ignore
(process.env.NEXT_PUBLIC_IS_LOCAL_MODE ?? 'false') === 'true';

export const IS_SELF_HOSTED_MODE = (process.env.NEXT_PUBLIC_IS_SELF_HOSTED_MODE ?? 'false') === 'true';

// Features in development
export const IS_K8S_DASHBOARD_ENABLED = true;
export const IS_METRICS_ENABLED = true;
Expand Down