diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9b76e35 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.next/ +node_modules/ \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..9bead98 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,12 @@ +services: + web: + build: + context: . + dockerfile: ./src/Dockerfile + target: runner + ports: + - "3000:3000" + +networks: + default: + name: clipfusion-network \ No newline at end of file diff --git a/next.config.ts b/next.config.ts index e9ffa30..12cecbe 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + output: "standalone", }; export default nextConfig; diff --git a/public/clipfusion-community-logo.png b/public/clipfusion-community-logo.png new file mode 100644 index 0000000..c5e7c66 Binary files /dev/null and b/public/clipfusion-community-logo.png differ diff --git a/public/clipfusion-community-logo.svg b/public/clipfusion-community-logo.svg new file mode 100644 index 0000000..a2750e5 --- /dev/null +++ b/public/clipfusion-community-logo.svg @@ -0,0 +1,106 @@ + + \ No newline at end of file diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 0000000..b153901 --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,50 @@ +FROM node:lts-alpine3.22 AS base + +FROM base AS deps +RUN apk add --no-cache libc6-compat +WORKDIR /app + +COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./ +RUN \ + if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ + elif [ -f package-lock.json ]; then npm ci; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ + else echo "Lockfile not found." && exit 1; \ + fi + +FROM base AS builder +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +ENV NEXT_TELEMETRY_DISABLED=1 + +RUN \ + if [ -f yarn.lock ]; then yarn run build; \ + elif [ -f package-lock.json ]; then npm run build; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ + else echo "Lockfile not found." && exit 1; \ + fi + +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 + +USER nextjs + +EXPOSE 3000 + +ENV PORT=3000 + +ENV HOSTNAME="0.0.0.0" +CMD ["node", "server.js"] \ No newline at end of file diff --git a/src/components/clipfusion-logo/ClipFusionLogo.tsx b/src/components/clipfusion-logo/ClipFusionLogo.tsx index eaf41ec..7b1bf59 100644 --- a/src/components/clipfusion-logo/ClipFusionLogo.tsx +++ b/src/components/clipfusion-logo/ClipFusionLogo.tsx @@ -8,7 +8,7 @@ export const ClipFusionLogo = (props: { className?: string }): ReactNode => (
ClipFusion
+Community