Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM oven/bun:slim AS base

ARG NEXT_PUBLIC_APP_URL

RUN apt-get update && apt-get install -y curl
RUN apt-get update && apt-get install -y adduser curl

# Stage 1: Install dependencies
FROM base AS deps
Expand Down
1,552 changes: 387 additions & 1,165 deletions bun.lock

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions cron.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM oven/bun:slim AS base

ARG NEXT_PUBLIC_APP_URL

RUN apt-get update && apt-get install -y adduser curl

# Stage 1: Install dependencies
FROM base AS deps
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install

# Stage 2: Build the application
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN bun run build

# Stage 3: Production server
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

RUN BUN_INSTALL=/usr/local bun install --global vercel-cron-runner

COPY --from=builder --chown=nextjs:nodejs /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/vercel.json ./vercel.json
COPY --from=builder --chown=nextjs:nodejs /app/entrypoint.sh ./entrypoint.sh

RUN chmod +x /app/entrypoint.sh

USER nextjs
EXPOSE 3000
ENV PORT=3000

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/config/next-config-js/output
ENV HOSTNAME="0.0.0.0"

ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["sh", "-c", "bun server.js & bun /usr/local/bin/vercel-cron-runner"]
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const nextConfig = {
output: "standalone",
typedRoutes: false,
reactCompiler: true,

Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"@turbowire/serverless": "^0.2.0",
"autoprefixer": "10.4.14",
"babel-plugin-react-compiler": "^1.0.0",
"baseline-browser-mapping": "^2.9.10",
"baseline-browser-mapping": "^2.11.8",
"better-auth": "^1.4.17",
"caniuse-lite": "^1.0.30001760",
"caniuse-lite": "^1.0.30001806",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
Expand All @@ -61,16 +61,16 @@
"lucide-react": "^0.503.0",
"mime-types": "^2.1.35",
"neverthrow": "^8.2.0",
"next": "16.1.0",
"next": "16.2.12",
"next-themes": "^0.3.0",
"node-ical": "^0.20.1",
"nodemailer": "^7.0.12",
"nuqs": "^2.4.1",
"postcss": "8.4.31",
"postgres": "^3.4.7",
"react": "19.2.3",
"react": "19.2.8",
"react-day-picker": "^8.10.1",
"react-dom": "19.2.3",
"react-dom": "19.2.8",
"react-email": "^4.0.17",
"react-markdown": "^10.1.0",
"rrule": "^2.8.1",
Expand All @@ -91,15 +91,15 @@
"@types/mime-types": "^2.1.4",
"@types/node": "20.1.0",
"@types/nodemailer": "^7.0.5",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"@types/react": "19.2.18",
"@types/react-dom": "19.2.4",
"drizzle-kit": "^0.31.5",
"encoding": "^0.1.13",
"typescript": "5.7.2"
},
"overrides": {
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3"
"@types/react": "19.2.18",
"@types/react-dom": "19.2.4"
},
"trustedDependencies": []
}
2 changes: 1 addition & 1 deletion trpc/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function TRPCReactProvider(
}),
httpBatchLink({
transformer: superjson,
url: `${process.env.NEXT_PUBLIC_APP_URL}/api/trpc`,
url: "/api/trpc",
methodOverride: "POST",
}),
],
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
Expand Down