Files

15 lines
443 B
Docker

# Build the static site and serve it with nginx
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build:pages
FROM nginx:alpine
# Fix mjs MIME type — without this plyr.min.mjs fails to load as ES module
RUN sed -i 's|application/javascript *js;|application/javascript js mjs;|' /etc/nginx/mime.types
COPY --from=build /app/public /usr/share/nginx/html
EXPOSE 80
# prod rebuild 1784919309