Complete MoreminiMore Astro site migration
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,4 +1,3 @@
|
||||
# Build the static Astro site
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
@@ -6,9 +5,13 @@ RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Serve static files with a small, unprivileged web server
|
||||
FROM nginxinc/nginx-unprivileged:1.27-alpine AS production
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 8080
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
FROM node:22-alpine AS production
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev && npm cache clean --force
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY server.js ./server.js
|
||||
USER node
|
||||
EXPOSE 4321
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user