Fix Svelte 5 deprecation: Replace <slot /> with {@render children()}
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -1,14 +1,16 @@
|
||||
# Build stage
|
||||
FROM node:20-slim AS builder
|
||||
FROM node:20 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install build dependencies for better-sqlite3
|
||||
RUN apt-get update && apt-get install -y python3 make g++
|
||||
# Use a faster npm registry mirror
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
# Copy package files first for better caching
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the code and build
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
@@ -17,24 +19,29 @@ FROM node:20-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install production dependencies only
|
||||
# Use a faster npm registry mirror
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
# Install only production dependencies
|
||||
# Copy package files again for production layer caching
|
||||
COPY package*.json ./
|
||||
# Install build tools temporarily for native modules if needed,
|
||||
# though many have pre-built binaries on standard Node images
|
||||
RUN apt-get update && apt-get install -y python3 make g++ \
|
||||
&& npm install --omit=dev \
|
||||
&& apt-get purge -y python3 make g++ \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy built app and static files from builder
|
||||
COPY --from=builder /app/build ./build
|
||||
COPY --from=builder /app/static ./static
|
||||
|
||||
# Ensure the database file isn't baked in unless desired,
|
||||
# but adapter-node needs the build folder.
|
||||
# The app will create data.db in /app/ at runtime.
|
||||
|
||||
# App configuration
|
||||
ENV PORT=1995
|
||||
ENV NODE_ENV=production
|
||||
|
||||
EXPOSE 1995
|
||||
|
||||
# The database data.db will be created at /app/data.db or mounted via volume
|
||||
CMD ["node", "build"]
|
||||
|
||||
Reference in New Issue
Block a user