-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
33 lines (23 loc) · 1.02 KB
/
Dockerfile
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
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.0
ENV NODE_ENV=PRODUCTION
WORKDIR /app/
RUN apt-get update
RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
ENV NODE_MAJOR=20
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install -y nodejs
# Install sharp TODO update this when we change sharp versions
RUN npm install [email protected]
# Install the landing assets
COPY ./basemaps-landing*.tgz /app/
COPY ./basemaps-cogify*.tgz /app/
COPY ./basemaps-smoke*.tgz /app/
COPY ./basemaps-server*.tgz /app/
# Copy the static files for v1/health check
COPY ./static/ /app/static/
RUN npm install ./basemaps-landing*.tgz ./basemaps-cogify*.tgz ./basemaps-smoke*.tgz ./basemaps-server*.tgz
COPY dist/index.cjs /app/
ENTRYPOINT [ "node", "./index.cjs" ]