-
Notifications
You must be signed in to change notification settings - Fork 0
/
hsb-ui.Dockerfile
39 lines (25 loc) · 1.48 KB
/
hsb-ui.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
39
# see hsb-things.Dockerfile for comments
FROM balenalib/raspberrypi4-64-node:12.14.1-bullseye-build AS build
WORKDIR /usr/src/home-sandbox/
COPY package.json .
COPY hsb-service-utils/package.json ./hsb-service-utils/
COPY hsb-ui/package.json ./hsb-ui/
RUN yarn workspace hsb-service-utils install --no-lockfile --non-interactive
RUN yarn workspace hsb-ui install --no-lockfile --non-interactive
COPY hsb-service-utils ./hsb-service-utils
COPY hsb-ui ./hsb-ui
RUN yarn workspace hsb-service-utils build
RUN yarn workspace hsb-ui build
RUN yarn clean-node-modules
RUN yarn workspace hsb-service-utils install --no-lockfile --non-interactive --production
RUN yarn workspace hsb-ui install --no-lockfile --non-interactive --production
FROM balenalib/raspberrypi4-64-node:12.14.1-bullseye-run
WORKDIR /usr/src/home-sandbox/
RUN yarn global add [email protected]
COPY ./ .
COPY --from=build /usr/src/home-sandbox/node_modules /usr/src/home-sandbox/node_modules
COPY --from=build /usr/src/home-sandbox/hsb-service-utils/node_modules /usr/src/home-sandbox/hsb-service-utils/node_modules
# COPY --from=build /usr/src/home-sandbox/hsb-ui/node_modules /usr/src/home-sandbox/hsb-ui/node_modules
COPY --from=build /usr/src/home-sandbox/hsb-service-utils/build /usr/src/home-sandbox/hsb-service-utils/build
COPY --from=build /usr/src/home-sandbox/hsb-ui/build /usr/src/home-sandbox/hsb-ui/build
CMD yarn workspace hsb-ui serve -s | tail -n +3 | pino-sentry --dsn=$SENTRY_DSN --serverName="ui-$BALENA_DEVICE_UUID"