diff --git a/Dockerfile b/Dockerfile index 5e532af..f61fcbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,29 @@ FROM node:20-alpine AS build WORKDIR /app + COPY package*.json ./ -RUN npm ci +RUN npm install + COPY . . -# Ensure CSS variables are present -RUN mkdir -p public/styles -RUN cp -r styles/* public/styles/ || true + RUN npm run build FROM node:20-alpine AS production +ENV NODE_ENV=production WORKDIR /app -RUN npm install -g serve -COPY --from=build /app/dist ./dist + +# Copy built app and minimal runtime files +COPY --from=build /app/dist /app/dist +COPY --from=build /app/package*.json /app/ + +RUN npm pkg delete devDependencies || true EXPOSE 3000 -CMD ["serve", "-s", "dist", "-l", "3000"] + +# Run Astro server entry (node adapter standalone) +CMD ["node", "dist/server/entry.mjs"] HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD wget -qO- http://localhost:3000/ || exit 1 \ No newline at end of file diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 50d1a1c..6fa0089 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,13 +1,11 @@ --- // src/components/Footer.astro -import "../styles/components/Footer.css" +import "/styles/components/Footer.css" const currentYear = new Date().getFullYear(); --- -