This commit updates multiple dependencies within `package-lock.json`, including upgrades for Astro, @astrojs packages, and various Sharp components. Additionally, it introduces new optional dependencies and enforces compatibility with Node 18 and higher in certain components.
29 lines
577 B
Docker
29 lines
577 B
Docker
FROM node:20-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
FROM node:20-alpine AS production
|
|
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app
|
|
|
|
# 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
|
|
|
|
# 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 |