-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
32 lines (19 loc) · 956 Bytes
/
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
FROM node:18-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN --mount=type=secret,id=npm_token \
echo "//npm.pkg.github.com/:_authToken='$(cat /run/secrets/npm_token)'" > "/app/.npmrc" &&\
echo "@ts4nfdi:registry=https://npm.pkg.github.com" >> "/app/.npmrc"
RUN npm install --force
COPY . .
ENV NEXT_PUBLIC_AUTOCOMPLETE_DOCUMENTATION_URL=https://ts4nfdi.github.io/terminology-service-suite/comp/latest/?path=/docs/react_search-autocompletewidget--docs
ENV NEXT_PUBLIC_API_GATEWAY_ENDPOINT=https://ts4nfdi-api-gateway.prod.km.k8s.zbmed.de/api-gateway/
ENV NEXT_PUBLIC_API_GATEWAY_DEFAULT_PARAMETERS="ontology=mesh,efo&type=class&collection=nfdi4health&fieldList=description,label,iri,ontology_name,type,short_form"
ENV NEXT_PUBLIC_CAPTCHA_SITE_KEY=FCMNGJO6FSOIB5ER
RUN npm run build
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app ./
RUN npm install --production --force
EXPOSE 3000
CMD ["npm", "start"]