-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
38 lines (24 loc) · 939 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
33
34
35
36
37
38
FROM node:16.15.0-alpine as build
ARG COMMIT_SHA=<not-specified>
ENV NODE_ENV=production
WORKDIR /build-dir
COPY package.json .
COPY package-lock.json .
RUN npm ci
COPY . .
RUN echo "mia_template_service_name_placeholder: $COMMIT_SHA" >> ./commit.sha
########################################################################################################################
FROM node:16.15.0-alpine
LABEL maintainer="%CUSTOM_PLUGIN_CREATOR_USERNAME%" \
name="mia_template_service_name_placeholder" \
description="%CUSTOM_PLUGIN_SERVICE_DESCRIPTION%" \
eu.mia-platform.url="https://www.mia-platform.eu" \
eu.mia-platform.version="0.1.0"
ENV NODE_ENV=production
ENV LOG_LEVEL=info
ENV SERVICE_PREFIX=/
ENV HTTP_PORT=3000
WORKDIR /home/node/app
COPY --from=build /build-dir ./
USER node
CMD ["npm", "-s", "start", "--", "--port", "${HTTP_PORT}", "--log-level", "${LOG_LEVEL}", "--prefix=${SERVICE_PREFIX}"]