diff --git a/Dockerfile b/Dockerfile index a566578ba..73efcc024 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,9 @@ RUN mkdir -p data # Build Astro RUN npm run build +# Copy public folder to dist (Astro doesn't do this automatically) +RUN cp -r /app/public/* /app/dist/ + # Production Stage FROM node:20-alpine @@ -25,9 +28,8 @@ RUN apk add --no-cache sqlite-libs COPY package*.json ./ RUN npm install --production -# Copy ALL built assets +# Copy built assets from builder COPY --from=builder /app/dist ./dist -COPY --from=builder /app/public ./public COPY --from=builder /app/data ./data EXPOSE 80 @@ -41,5 +43,5 @@ ENV ASTRO_DB_REMOTE_URL=file:/app/data/consent.db ENV HOST=0.0.0.0 ENV PORT=80 -# Serve static files on port 80 +# Serve static files from dist CMD ["npx", "serve", "dist", "-l", "80", "--no-clipboard", "--cors"] diff --git a/src/pages/index.astro b/src/pages/index.astro index b50660b40..be5e74c9e 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -5,7 +5,6 @@ import Footer from '../components/Footer.astro'; import FloatingContact from '../components/FloatingContact.astro'; import { productCategories } from '../data/site-config'; -// Featured products const featuredProducts = productCategories.filter(p => ['ppr-elephant', 'hdpe', 'poloplast', 'syler', 'xylent'].includes(p.id) ).slice(0, 6); @@ -16,7 +15,7 @@ const featuredProducts = productCategories.filter(p =>
-
+