17 lines
397 B
Docker
17 lines
397 B
Docker
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app/www
|
|
COPY www/package.json www/package-lock.json ./
|
|
RUN npm install
|
|
|
|
COPY www/ ./
|
|
RUN node build-blog.js
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/www/ /usr/share/nginx/html/
|
|
COPY docker-entrypoint.d/ /docker-entrypoint.d/
|
|
RUN chmod +x /docker-entrypoint.d/*.sh
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.d/30-envsubst.sh", "--", "nginx", "-g", "daemon off;"]
|