Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
FROM node:24.0.0 AS build

FROM node:24-slim AS build
WORKDIR /tmp/buildApp

COPY ./package*.json ./
COPY .husky/ .husky/

RUN npm install
COPY . .
RUN npm run build

FROM node:24.0.0-alpine3.21 AS production

RUN apk add --no-cache dumb-init python3 make g++

# Production stage with GDAL setup
FROM node:24-slim AS production
RUN apt-get update && apt-get install -y --no-install-recommends \
dumb-init \
gdal-bin \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_ENV=production
ENV SERVER_PORT=8080


WORKDIR /usr/src/app

COPY --chown=node:node package*.json ./
COPY .husky/ .husky/

RUN npm ci --only=production

COPY --chown=node:node --from=build /tmp/buildApp/dist .
COPY --chown=node:node ./config ./config


USER node
EXPOSE 8080

CMD ["dumb-init", "node", "--import", "./instrumentation.mjs", "./index.js"]
Loading