Compare commits
No commits in common. "537ed60fa87806a087f8d80e85bc0ee93b595f5f" and "6dd88f897c33e34f6ae567f1145d070cdeb94442" have entirely different histories.
537ed60fa8
...
6dd88f897c
12
Dockerfile
12
Dockerfile
@ -7,18 +7,10 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
|
|||||||
ENV CI=true
|
ENV CI=true
|
||||||
|
|
||||||
WORKDIR /app
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
# Build the application
|
# Install dependencies and build
|
||||||
RUN pnpm build
|
RUN pnpm install && pnpm build
|
||||||
|
|
||||||
FROM node:18-alpine AS runner
|
FROM node:18-alpine AS runner
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,16 @@
|
|||||||
import { revalidatePath } from 'next/cache';
|
import { revalidateTag } from 'next/cache';
|
||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
|
|
||||||
|
import { FetchTags } from '@/shared/api/tags';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
revalidatePath('*'); // Drop all cache
|
revalidateTag(FetchTags.TAYLOR);
|
||||||
|
|
||||||
return NextResponse.json({ success: true });
|
return NextResponse.json({ success: true });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: 'Failed to drop cache', detail: err },
|
{ error: 'Failed to revalidate', detail: err },
|
||||||
{ status: 500 },
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user