add first draft working docker setup
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { SERVER_IP, PROXY_PORT } from '../../../../config.ts';
|
||||
|
||||
const BASE_URL = typeof window === 'undefined'
|
||||
? `http://${SERVER_IP}:${PROXY_PORT}`
|
||||
: '';
|
||||
const BASE_URL =
|
||||
typeof window === 'undefined'
|
||||
? typeof process !== 'undefined'
|
||||
? process.env.PROXY_URL ||
|
||||
`http://${process.env.SERVER_IP || '192.168.1.225'}:${process.env.PROXY_PORT || '3456'}`
|
||||
: ''
|
||||
: '';
|
||||
|
||||
async function memberFetch<T = unknown>(
|
||||
method: string,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { RequestEvent } from '@sveltejs/kit';
|
||||
import { SERVER_IP, PROXY_PORT } from '../../../../config.ts';
|
||||
import { PROXY_URL } from '$lib/server/env';
|
||||
|
||||
const HONO_URL = `http://${SERVER_IP}:${PROXY_PORT}`;
|
||||
const HONO_URL = PROXY_URL;
|
||||
|
||||
export function getSession(event: RequestEvent) {
|
||||
return event.locals.session;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { SERVER_IP, PROXY_PORT } from '../../../../config.ts';
|
||||
import { PROXY_URL } from '$lib/server/env';
|
||||
import type { RequestEvent } from '@sveltejs/kit';
|
||||
|
||||
const HONO_URL = `http://${SERVER_IP}:${PROXY_PORT}`;
|
||||
const HONO_URL = PROXY_URL;
|
||||
|
||||
function sessionHeaders(event: RequestEvent): Record<string, string> {
|
||||
const s = event.locals.session;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { SERVER_IP, PB_PORT, PB_EMAIL, PB_PASSWORD } from '../../../../config.ts';
|
||||
|
||||
const PB_ENDPOINT = `http://${SERVER_IP}:${PB_PORT}`;
|
||||
import { PB_ENDPOINT, PB_EMAIL, PB_PASSWORD } from './env';
|
||||
|
||||
let token: string | null = null;
|
||||
let tokenExpiry = 0;
|
||||
|
||||
Reference in New Issue
Block a user