-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
30 lines (22 loc) · 889 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
FROM node:lts as build-stage
RUN yarn config set logFilters --json '{ code: "YN0013", level: "discard" }'
WORKDIR /app
COPY .yarn/releases .yarn/releases/
COPY yarn.lock package.json .yarnrc.yml ./
RUN YARN_CHECKSUM_BEHAVIOR=ignore yarn install
COPY src src/
COPY public public/
COPY lib lib/
COPY .eslintrc .env babel.config.js vue.config.js ./
ARG METRICQ_BACKEND=http://metricq-grafana/
ARG METRICQ_BACKEND_AUTH=user:pass
ENV VUE_APP_METRICQ_BACKEND=${METRICQ_BACKEND}
ENV VUE_APP_METRICQ_BACKEND_AUTH=${METRICQ_BACKEND_AUTH}
RUN NODE_OPTIONS=--openssl-legacy-provider yarn build
FROM nginx:mainline-alpine as production-stage
ENV METRICQ_BACKEND=
ENV METRICQ_BACKEND_USER=
ENV METRICQ_BACKEND_PASS=
COPY ./docker/50-webview-backend.sh /docker-entrypoint.d/
RUN chmod +x /docker-entrypoint.d/50-webview-backend.sh
COPY --from=build-stage /app/dist /usr/share/nginx/html/webview