Skip to content

Commit

Permalink
Use nginx to serve built files (#808)
Browse files Browse the repository at this point in the history
Resolves #842
Better suited than python + handles sigterm better

Co-authored-by: Harel M <[email protected]>
  • Loading branch information
nbr23 and HarelM authored Dec 26, 2023
1 parent a22476c commit 09a1f3f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit 09a1f3f

Please sign in to comment.