Merge pull request #50 from killer-cf/config-self-convex
Config self convex
This commit is contained in:
@@ -21,9 +21,6 @@ RUN bun install
|
||||
# Build the project
|
||||
COPY --from=prepare /app/out/full/ .
|
||||
|
||||
# Copy the rest of the source code
|
||||
COPY --from=prepare /app/out/full/ .
|
||||
|
||||
ARG PUBLIC_CONVEX_URL
|
||||
ENV PUBLIC_CONVEX_URL=$PUBLIC_CONVEX_URL
|
||||
|
||||
@@ -35,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
|
||||
|
||||
@@ -63,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,16 +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"],
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ["lib-jitsi-meet"], // Excluir para permitir carregamento dinâmico no browser
|
||||
},
|
||||
ssr: {
|
||||
noExternal: [], // lib-jitsi-meet não funciona no SSR, deve ser carregada apenas no browser
|
||||
},
|
||||
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"
|
||||
}
|
||||
2
packages/backend/convex/_generated/api.d.ts
vendored
2
packages/backend/convex/_generated/api.d.ts
vendored
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
|
||||
import type * as actions_email from "../actions/email.js";
|
||||
import type * as actions_jitsiServer from "../actions/jitsiServer.js";
|
||||
import type * as actions_linkPreview from "../actions/linkPreview.js";
|
||||
import type * as actions_pushNotifications from "../actions/pushNotifications.js";
|
||||
import type * as actions_smtp from "../actions/smtp.js";
|
||||
@@ -69,7 +68,6 @@ import type {
|
||||
|
||||
declare const fullApi: ApiFromModules<{
|
||||
"actions/email": typeof actions_email;
|
||||
"actions/jitsiServer": typeof actions_jitsiServer;
|
||||
"actions/linkPreview": typeof actions_linkPreview;
|
||||
"actions/pushNotifications": typeof actions_pushNotifications;
|
||||
"actions/smtp": typeof actions_smtp;
|
||||
|
||||
@@ -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