Files
editor/Dockerfile
Max 09a1f3f87b Use nginx to serve built files (#808)
Resolves #842
Better suited than python + handles sigterm better

Co-authored-by: Harel M <harel.mazor@gmail.com>
2023-12-26 23:28:17 +02:00

17 lines
448 B
Docker

FROM node:18 as builder
WORKDIR /maputnik
# Only copy package.json to prevent npm install from running on every build
COPY package.json package-lock.json ./
RUN npm install
# Build maputnik
COPY . .
RUN npm run build
#---------------------------------------------------------------------------
# Create a clean nginx-alpine slim image with just the build results
FROM nginx:alpine-slim
COPY --from=builder /maputnik/dist /usr/share/nginx/html/