diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/Dockerfile | 43 | ||||
| -rw-r--r-- | apps/web/drizzle.config.ts | 2 | ||||
| -rw-r--r-- | apps/web/next.config.ts | 1 | ||||
| -rw-r--r-- | apps/web/src/app/api/health/route.ts | 5 | ||||
| -rw-r--r-- | apps/web/src/components/editor/timeline.tsx | 58 |
5 files changed, 65 insertions, 44 deletions
diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index ca1f0987..8b13ce38 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,30 +1,43 @@ -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
+# Install dependencies and 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 NEXT_TELEMETRY_DISABLED=1
+
+WORKDIR /app/apps/web
RUN bun run build
# Production image
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 +46,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/drizzle.config.ts b/apps/web/drizzle.config.ts index 37ff3cc1..615eea57 100644 --- a/apps/web/drizzle.config.ts +++ b/apps/web/drizzle.config.ts @@ -13,7 +13,7 @@ if (!process.env.DATABASE_URL) { }
export default {
- schema: "./src/lib/db/schema.ts",
+ schema: "../../packages/db/src/schema.ts",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL,
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/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx index 12907738..16dcb34f 100644 --- a/apps/web/src/components/editor/timeline.tsx +++ b/apps/web/src/components/editor/timeline.tsx @@ -602,38 +602,40 @@ export function Timeline() { <div className="w-px h-6 bg-border mx-1" />
{/* Time Display */}
- <div className="text-xs text-muted-foreground font-mono px-2">
- {Math.floor(currentTime * 10) / 10}s /{" "}
- {Math.floor(duration * 10) / 10}s
+ <div className="text-xs text-muted-foreground font-mono px-2"
+ style={{ minWidth: '18ch', textAlign: 'center' }}
+ >
+ {currentTime.toFixed(1)}s / {duration.toFixed(1)}s
</div>
- <div className="w-px h-6 bg-border mx-1" />
-
{/* Test Clip Button - for debugging */}
{tracks.length === 0 && (
- <Tooltip>
- <TooltipTrigger asChild>
- <Button
- variant="outline"
- size="sm"
- onClick={() => {
- const trackId = addTrack("video");
- addClipToTrack(trackId, {
- mediaId: "test",
- name: "Test Clip",
- duration: 5,
- startTime: 0,
- trimStart: 0,
- trimEnd: 0,
- });
- }}
- className="text-xs"
- >
- Add Test Clip
- </Button>
- </TooltipTrigger>
- <TooltipContent>Add a test clip to try playback</TooltipContent>
- </Tooltip>
+ <>
+ <div className="w-px h-6 bg-border mx-1" />
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => {
+ const trackId = addTrack("video");
+ addClipToTrack(trackId, {
+ mediaId: "test",
+ name: "Test Clip",
+ duration: 5,
+ startTime: 0,
+ trimStart: 0,
+ trimEnd: 0,
+ });
+ }}
+ className="text-xs"
+ >
+ Add Test Clip
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Add a test clip to try playback</TooltipContent>
+ </Tooltip>
+ </>
)}
<div className="w-px h-6 bg-border mx-1" />
|
