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
|
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 . .
|
||||||
|
|
||||||
# Install dependencies and build
|
# Build the application
|
||||||
RUN pnpm install && pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
FROM node:18-alpine AS runner
|
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 { NextResponse } from 'next/server';
|
||||||
|
|
||||||
import { FetchTags } from '@/shared/api/tags';
|
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
revalidateTag(FetchTags.TAYLOR);
|
revalidatePath('*'); // Drop all cache
|
||||||
|
|
||||||
return NextResponse.json({ success: true });
|
return NextResponse.json({ success: true });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: 'Failed to revalidate', detail: err },
|
{ error: 'Failed to drop cache', detail: err },
|
||||||
{ status: 500 },
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user