feat: Add @convex-dev/better-auth dependency and refactor Dockerfile to support monorepo workspace builds, updating Turbo build output path.
This commit is contained in:
@@ -32,25 +32,31 @@ RUN bunx turbo build
|
||||
# Production stage
|
||||
FROM oven/bun:1-slim AS production
|
||||
|
||||
# Set working directory
|
||||
# Set working directory to match builder structure
|
||||
WORKDIR /app
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup --system --gid 1001 sveltekit
|
||||
RUN adduser --system --uid 1001 sveltekit
|
||||
|
||||
# Copy built application from base stage
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/build ./build
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/package.json ./package.json
|
||||
# Copy node_modules from root (Bun manages workspaces centrally)
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/node_modules ./node_modules
|
||||
# Copy root node_modules (contains hoisted dependencies)
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/node_modules ./node_modules
|
||||
|
||||
# Copy built application and workspace files
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/build ./apps/web/build
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/package.json ./apps/web/package.json
|
||||
# Copy workspace node_modules (contains symlinks to root node_modules)
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/node_modules ./apps/web/node_modules
|
||||
|
||||
# Copy any additional files needed for runtime
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/static ./static
|
||||
COPY --from=builder --chown=sveltekit:sveltekit /app/apps/web/static ./apps/web/static
|
||||
|
||||
# Switch to non-root user
|
||||
USER sveltekit
|
||||
|
||||
# Set working directory to the app
|
||||
WORKDIR /app/apps/web
|
||||
|
||||
# Expose the port that the app runs on
|
||||
EXPOSE 5173
|
||||
|
||||
@@ -60,7 +66,7 @@ ENV PORT=5173
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD bun --version || exit 1
|
||||
CMD bun --version || exit 1
|
||||
|
||||
# Start the application
|
||||
CMD ["bun", "./build/index.js"]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { sveltekit } from "@sveltejs/kit/vite";
|
||||
import { defineConfig } from "vite";
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), sveltekit()],
|
||||
resolve: {
|
||||
dedupe: ["lucide-svelte"],
|
||||
},
|
||||
dedupe: ['lucide-svelte']
|
||||
}
|
||||
});
|
||||
|
||||
1
bun.lock
1
bun.lock
@@ -5,6 +5,7 @@
|
||||
"": {
|
||||
"name": "sgse-app",
|
||||
"dependencies": {
|
||||
"@convex-dev/better-auth": "^0.9.7",
|
||||
"@tanstack/svelte-form": "^1.23.8",
|
||||
"chart.js": "^4.5.1",
|
||||
"lucide-svelte": "^0.552.0",
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
"lucide-svelte": "^0.552.0",
|
||||
"prettier-plugin-svelte": "^3.4.0",
|
||||
"svelte-chartjs": "^3.1.5",
|
||||
"svelte-sonner": "^1.0.5"
|
||||
"svelte-sonner": "^1.0.5",
|
||||
"@convex-dev/better-auth": "^0.9.7"
|
||||
},
|
||||
"packageManager": "bun@1.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
||||
"outputs": ["dist/**"]
|
||||
"outputs": ["build/**"]
|
||||
},
|
||||
"lint": {
|
||||
"dependsOn": ["^lint"]
|
||||
|
||||
Reference in New Issue
Block a user