Compare commits
3 Commits
0a55276394
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 317f01520f | |||
| 24ffe3d8a0 | |||
| f25873dd6d |
+2
-1
@@ -1,10 +1,11 @@
|
|||||||
|
name: famdone-service
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/Dockerfile
|
dockerfile: docker/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "${FRONTEND_PORT:-3001}:3001" # nginx / app (public)
|
- "${FRONTEND_PORT:-3001}:80" # nginx / app (public)
|
||||||
- "${PB_PORT:-8091}:8090" # PocketBase admin UI (private network)
|
- "${PB_PORT:-8091}:8090" # PocketBase admin UI (private network)
|
||||||
volumes:
|
volumes:
|
||||||
- "${PB_DATA:-./pb_data}:/app/pb_data" # PB DB persistence
|
- "${PB_DATA:-./pb_data}:/app/pb_data" # PB DB persistence
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ RUN corepack enable
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
RUN pnpm --filter frontend build
|
RUN pnpm --filter famchamp build
|
||||||
RUN pnpm --filter proxy build
|
RUN pnpm --filter proxy build
|
||||||
|
|
||||||
# ── Runtime stage ────────────────────────────────────────
|
# ── Runtime stage ────────────────────────────────────────
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Handle } from '@sveltejs/kit';
|
import type { Handle } from '@sveltejs/kit';
|
||||||
|
|
||||||
const COOKIE_NAME = 'famdon-sesh';
|
const COOKIE_NAME = 'session';
|
||||||
|
|
||||||
export const handle: Handle = async ({ event, resolve }) => {
|
export const handle: Handle = async ({ event, resolve }) => {
|
||||||
const raw = event.cookies.get(COOKIE_NAME);
|
const raw = event.cookies.get(COOKIE_NAME);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { fail, redirect } from '@sveltejs/kit';
|
import { fail, isRedirect, redirect } from '@sveltejs/kit';
|
||||||
import { signup, setSessionCookie, setPbTokenCookie } from '$lib/server/auth';
|
import { signup, setSessionCookie, setPbTokenCookie } from '$lib/server/auth';
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
@@ -28,7 +28,7 @@ export const actions = {
|
|||||||
setPbTokenCookie(event, result.token);
|
setPbTokenCookie(event, result.token);
|
||||||
throw redirect(303, `/${result.famSlug}/${result.memberName}`);
|
throw redirect(303, `/${result.famSlug}/${result.memberName}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof redirect) throw e;
|
if (isRedirect(e)) throw e;
|
||||||
return fail(400, { error: e instanceof Error ? e.message : 'Signup failed', email, famName });
|
return fail(400, { error: e instanceof Error ? e.message : 'Signup failed', email, famName });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user