From 9bb19712e5c213262a18051bf0c5d220b2de245e Mon Sep 17 00:00:00 2001 From: yassinehaimouch Date: Tue, 24 Jun 2025 23:27:00 +0100 Subject: add: opengraph image --- apps/web/src/app/opengraph-image.jpg | Bin 0 -> 55439 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/web/src/app/opengraph-image.jpg (limited to 'apps/web/src/app') diff --git a/apps/web/src/app/opengraph-image.jpg b/apps/web/src/app/opengraph-image.jpg new file mode 100644 index 00000000..d45c0854 Binary files /dev/null and b/apps/web/src/app/opengraph-image.jpg differ -- cgit v1.3.1 From 22ae5d0e374d9ccf7d5f5e3dce4f3df2feb6ab67 Mon Sep 17 00:00:00 2001 From: yassinehaimouch Date: Wed, 25 Jun 2025 01:16:37 +0100 Subject: fix: metadata for og image --- apps/web/public/opengraph-image.jpg | Bin 0 -> 55439 bytes apps/web/src/app/layout.tsx | 29 +++++++++++++++++++++++++++++ apps/web/src/app/opengraph-image.jpg | Bin 55439 -> 0 bytes 3 files changed, 29 insertions(+) create mode 100644 apps/web/public/opengraph-image.jpg delete mode 100644 apps/web/src/app/opengraph-image.jpg (limited to 'apps/web/src/app') diff --git a/apps/web/public/opengraph-image.jpg b/apps/web/public/opengraph-image.jpg new file mode 100644 index 00000000..d45c0854 Binary files /dev/null and b/apps/web/public/opengraph-image.jpg differ diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 1cd4b3b9..5d33100d 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -16,6 +16,35 @@ export const metadata: Metadata = { title: "OpenCut", description: "A simple but powerful video editor that gets the job done. In your browser.", + openGraph: { + title: "OpenCut", + description: + "A simple but powerful video editor that gets the job done. In your browser.", + url: "https://opencut.app", + siteName: "OpenCut", + locale: "en_US", + type: "website", + images: [ + { + url: "https://opencut.app/opengraph-image.jpg", + width: 1200, + height: 630, + alt: "OpenCut", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: "OpenCut", + description: + "A simple but powerful video editor that gets the job done. In your browser.", + creator: "@opencutapp", + images: ["/opengraph-image.jpg"], + }, + robots: { + index: true, + follow: true, + }, }; export default function RootLayout({ diff --git a/apps/web/src/app/opengraph-image.jpg b/apps/web/src/app/opengraph-image.jpg deleted file mode 100644 index d45c0854..00000000 Binary files a/apps/web/src/app/opengraph-image.jpg and /dev/null differ -- cgit v1.3.1 From 547f566fc20466df0eac5a8ef78642d21ee5c0a9 Mon Sep 17 00:00:00 2001 From: ga1az Date: Tue, 24 Jun 2025 23:44:06 -0400 Subject: refactor(docker): update Dockerfile and docker-compose for improved build process and add health check API --- apps/web/Dockerfile | 42 ++++++++++++++++++++++++------------ apps/web/next.config.ts | 1 + apps/web/src/app/api/health/route.ts | 5 +++++ docker-compose.yaml | 2 +- 4 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 apps/web/src/app/api/health/route.ts (limited to 'apps/web/src/app') diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index ca1f0987..49820e78 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,16 +1,27 @@ -FROM oven/bun:latest AS base +FROM oven/bun:alpine AS base -# Install dependencies -FROM base AS deps -WORKDIR /app -COPY package.json bun.lock ./ -RUN bun install --frozen-lockfile - -# Build the application FROM base AS builder + WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules -COPY . . + +COPY package.json package.json +COPY bun.lock bun.lock +COPY turbo.json turbo.json + +COPY apps/web/package.json apps/web/package.json +COPY packages/db/package.json packages/db/package.json +COPY packages/auth/package.json packages/auth/package.json + +RUN bun install + +COPY apps/web/ apps/web/ +COPY packages/db/ packages/db/ +COPY packages/auth/ packages/auth/ + +ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 + +WORKDIR /app/apps/web RUN bun run build # Production image @@ -18,13 +29,16 @@ FROM base AS runner WORKDIR /app ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs -COPY --from=builder /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +COPY --from=builder --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public +COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static + +RUN chown nextjs:nodejs apps USER nextjs @@ -33,4 +47,4 @@ EXPOSE 3000 ENV PORT=3000 ENV HOSTNAME="0.0.0.0" -CMD ["bun", "server.js"] \ No newline at end of file +CMD ["bun", "apps/web/server.js"] \ No newline at end of file diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index de7fefe2..319ca134 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -6,6 +6,7 @@ const nextConfig: NextConfig = { }, reactStrictMode: true, productionBrowserSourceMaps: true, + output: "standalone", }; export default nextConfig; diff --git a/apps/web/src/app/api/health/route.ts b/apps/web/src/app/api/health/route.ts new file mode 100644 index 00000000..ecb9ce04 --- /dev/null +++ b/apps/web/src/app/api/health/route.ts @@ -0,0 +1,5 @@ +import { NextRequest } from "next/server"; + +export async function GET(request: NextRequest) { + return new Response("OK", { status: 200 }); +} diff --git a/docker-compose.yaml b/docker-compose.yaml index f5973f3a..e3fc55ac 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -48,7 +48,7 @@ services: start_period: 10s web: build: - context: ./apps/web + context: . dockerfile: ./apps/web/Dockerfile restart: unless-stopped ports: -- cgit v1.3.1