feat: dickerization

This commit is contained in:
2026-01-20 22:47:34 +01:00
parent 87d68bbbff
commit 1fe5c4dfd3
3 changed files with 61 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
node_modules
build
.svelte-kit
.git
.env
.env.*
!.env.example
docker-compose.yml
Dockerfile
README.md
TODO_NEXTCLOUD.md
GEMINI.md
pnpm-workspace.yaml
+46
View File
@@ -0,0 +1,46 @@
# Stage 1: Build the application
FROM node:24-slim AS builder
# Enable corepack to use pnpm
RUN corepack enable
WORKDIR /app
# Copy configuration files
COPY package.json pnpm-lock.yaml .npmrc ./
# Install all dependencies (including devDependencies)
RUN pnpm install --frozen-lockfile
# Copy the rest of the application code
COPY . .
# Build the SvelteKit application
RUN pnpm run build
# Stage 2: Run the application
FROM node:24-slim AS runner
# Enable corepack to use pnpm
RUN corepack enable
WORKDIR /app
# Copy the build output and necessary files for production
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/.npmrc ./.npmrc
# Install only production dependencies
RUN pnpm install --prod --frozen-lockfile
# Expose the port the app runs on (SvelteKit defaults to 3000)
EXPOSE 3000
# Set environment variables
ENV NODE_ENV=production
ENV PORT=3000
# Run the application
CMD ["node", "build"]
+2 -3
View File
@@ -1,4 +1,3 @@
// This can be false if you're using a fallback (i.e. SPA mode)
export const prerender = true;
export const trailingSlash = 'always';
// export const prerender = true;
// export const trailingSlash = 'always';