mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
fix SELFHOST env on docker-compose
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
const app = useRuntimeConfig();
|
||||
|
||||
export function useSelfhosted() {
|
||||
return app.public.SELFHOSTED === 'TRUE' || app.public.SELFHOSTED === 'true';
|
||||
return app.public.SELFHOSTED.toString() === 'TRUE' || app.public.SELFHOSTED.toString() === 'true';
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export default defineEventHandler(async event => {
|
||||
|
||||
const exist = await OnboardingModel.exists({ user_id: data.user.id });
|
||||
|
||||
if (SELFHOSTED === 'TRUE' || SELFHOSTED === 'true') {
|
||||
if (SELFHOSTED.toString() === 'TRUE' || SELFHOSTED.toString() === 'true') {
|
||||
return { exists: true }
|
||||
}
|
||||
return { exist: exist != null }
|
||||
|
||||
@@ -66,7 +66,7 @@ export default defineEventHandler(async event => {
|
||||
const { project, project_id, user } = data;
|
||||
|
||||
|
||||
if (SELFHOSTED !== 'TRUE' && SELFHOSTED !== 'true') {
|
||||
if (SELFHOSTED.toString() !== 'TRUE' && SELFHOSTED.toString() !== 'true') {
|
||||
const PREMIUM_TYPE = project.premium_type;
|
||||
if (PREMIUM_TYPE === 0) return setResponseStatus(event, 400, 'Project not premium');
|
||||
}
|
||||
|
||||
@@ -42,6 +42,12 @@ export default async () => {
|
||||
logger.info('[SERVER] Completed');
|
||||
|
||||
logger.warn('[ANOMALY LOOP] Disabled');
|
||||
|
||||
|
||||
logger.warn(`[SELFHOSTED_SERVER] ${config.SELFHOSTED}`);
|
||||
logger.warn(`[SELFHOSTED_CLIENT] ${config.public.SELFHOSTED}`);
|
||||
logger.warn(`[AUTH] ${config.public.AUTH_MODE}`);
|
||||
|
||||
// anomalyLoop();
|
||||
|
||||
};
|
||||
@@ -95,6 +95,7 @@ services:
|
||||
NUXT_NOAUTH_USER_NAME: "defaultuser"
|
||||
|
||||
NUXT_SELFHOSTED: 'true'
|
||||
NUXT_PUBLIC_SELFHOSTED: 'true'
|
||||
|
||||
# Optional - Used for tests
|
||||
# NUXT_STRIPE_SECRET_TEST: ""
|
||||
|
||||
Reference in New Issue
Block a user