diff --git a/Dockerfile b/Dockerfile index c9ee59a..bbdbd09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM node:24-alpine +# Stage 1: Builder +FROM node:24-alpine AS builder # Install dumb-init, Python, and build tools for native builds RUN apk add --no-cache dumb-init python3 build-base @@ -9,8 +10,8 @@ WORKDIR /app # Copy package files COPY package*.json ./ -# Install dependencies -RUN npm install --production +# Install all dependencies (including dev dependencies for building) +RUN npm install # Copy application code COPY . . @@ -18,6 +19,21 @@ COPY . . # Build the application RUN npm run build +# Stage 2: Runner +FROM node:24-alpine + +# Install dumb-init for signal handling +RUN apk add --no-cache dumb-init + +# Set working directory +WORKDIR /app + +# Copy only production dependencies from builder stage +COPY --from=builder /app/node_modules ./node_modules + +# Copy the built application from builder stage +COPY --from=builder /app/.output ./.output + # Create data directory and database file for SQLite RUN mkdir -p /app/data && touch /app/data/sermons.db diff --git a/nuxt.config.ts b/nuxt.config.ts index 5a534c0..72bc61d 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -18,9 +18,6 @@ export default defineNuxtConfig({ nitro: { experimental: { wasm: true - }, - externals: { - external: ['tailwindcss'] } }, vite: { @@ -30,12 +27,6 @@ export default defineNuxtConfig({ } } }, - postcss: { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, - }, app: { head: { link: [