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