diff --git a/Dockerfile b/Dockerfile index 6d6ee31..135eaa8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,13 +23,13 @@ RUN apk add --no-cache openssl RUN npm install -g pnpm -ARG NEXT_PUBLIC_APP_URL="http://localhost:3001" -ARG RESEND_API_KEY="re_your_resend_api_key" -ARG DATABASE_URL="postgres://postgres:postgres@postgres:5432/wrdo" +# ARG NEXT_PUBLIC_APP_URL="http://localhost:3001" +# ARG RESEND_API_KEY="re_your_resend_api_key" +# ARG DATABASE_URL="postgres://postgres:postgres@postgres:5432/wrdo" -ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL -ENV RESEND_API_KEY=$RESEND_API_KEY -ENV DATABASE_URL=$DATABASE_URL +# ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL +# ENV RESEND_API_KEY=$RESEND_API_KEY +# ENV DATABASE_URL=$DATABASE_URL COPY --from=deps /app/node_modules ./node_modules COPY . . diff --git a/config/site.ts b/config/site.ts index 4764c75..c0957fb 100644 --- a/config/site.ts +++ b/config/site.ts @@ -1,7 +1,7 @@ import { SidebarNavItem, SiteConfig } from "types"; import { env } from "@/env.mjs"; -const site_url = env.NEXT_PUBLIC_APP_URL; +const site_url = env.NEXT_PUBLIC_APP_URL || "http://localhost:3030"; const open_signup = env.NEXT_PUBLIC_OPEN_SIGNUP; const email_r2_domain = env.NEXT_PUBLIC_EMAIL_R2_DOMAIN || ""; diff --git a/lib/email.ts b/lib/email.ts index f0c84ea..faa4211 100644 --- a/lib/email.ts +++ b/lib/email.ts @@ -2,7 +2,7 @@ import { Resend } from "resend"; import { env } from "@/env.mjs"; -export const resend = new Resend(env.RESEND_API_KEY); +export const resend = new Resend(env.RESEND_API_KEY || "re_key"); export function getVerificationEmailHtml({ url, diff --git a/lib/utils.ts b/lib/utils.ts index 442d9d1..4b6ac47 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -100,10 +100,6 @@ export function formatTime(input: string | number): string { }); } -export function absoluteUrl(path: string) { - return `${env.NEXT_PUBLIC_APP_URL}${path}`; -} - // Utils from precedent.dev export const timeAgo = (timestamp: Date, timeOnly?: boolean): string => { if (!timestamp) return "never"; diff --git a/package.json b/package.json index 0f8b629..7475f0b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "next start", "lint": "next lint", "preview": "next build && next start", - "postinstall": "prisma generate", + "db:generate": "prisma generate", "db:push": "npx prisma migrate deploy", "email": "email dev --dir emails --port 3333", "remove-content": "node ./setup.mjs"