mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
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>
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -6,17 +6,11 @@ COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
# Build maputnik
|
||||
# TODO: we should also do a npm run test here (needs more dependencies)
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Create a clean nginx-alpine slim image with just the build results
|
||||
FROM nginx:alpine-slim
|
||||
|
||||
# Create a clean python-based image with just the build results
|
||||
FROM python:3-slim
|
||||
WORKDIR /maputnik
|
||||
|
||||
COPY --from=builder /maputnik/dist .
|
||||
|
||||
EXPOSE 8888
|
||||
CMD python -m http.server 8888
|
||||
COPY --from=builder /maputnik/dist /usr/share/nginx/html/
|
||||
|
||||
Reference in New Issue
Block a user