generated from MapColonies/ts-server-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 702 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:24-slim AS build
WORKDIR /tmp/buildApp
COPY ./package*.json ./
COPY .husky/ .husky/
RUN npm install
COPY . .
RUN npm run build
# 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"]