Compare commits
2 Commits
6dd88f897c
...
537ed60fa8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
537ed60fa8 | ||
|
|
edb39d5538 |
12
Dockerfile
12
Dockerfile
@ -7,10 +7,18 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
ENV CI=true
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and pnpm-lock.yaml first for caching
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install
|
||||
|
||||
# Copy the rest of the files
|
||||
COPY . .
|
||||
|
||||
# Install dependencies and build
|
||||
RUN pnpm install && pnpm build
|
||||
# Build the application
|
||||
RUN pnpm build
|
||||
|
||||
FROM node:18-alpine AS runner
|
||||
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
import { revalidateTag } from 'next/cache';
|
||||
import { revalidatePath } from 'next/cache';
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
import { FetchTags } from '@/shared/api/tags';
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
revalidateTag(FetchTags.TAYLOR);
|
||||
revalidatePath('*'); // Drop all cache
|
||||
|
||||
return NextResponse.json({ success: true });
|
||||
} catch (err) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to revalidate', detail: err },
|
||||
{ error: 'Failed to drop cache', detail: err },
|
||||
{ status: 500 },
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user