-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (26 loc) · 909 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
# node, arm32v7/node
ARG BASE_IMAGE=node
FROM $BASE_IMAGE:10 as builder
ENV NODE_ENV production
WORKDIR /build
COPY backend/package.json ./backend/
COPY backend/yarn.lock ./backend/
RUN cd backend && yarn --production=false --frozen-lockfile --non-interactive
COPY frontend/package.json ./frontend/
COPY frontend/yarn.lock ./frontend/
RUN cd frontend && yarn --production=false --frozen-lockfile --non-interactive
COPY . .
RUN cd backend && yarn run build
ARG CONFIGURATION=en
RUN cd frontend && yarn run build --configuration=$CONFIGURATION
FROM $BASE_IMAGE:10
ENV NODE_ENV production
WORKDIR /server
COPY backend/package.json ./
COPY backend/yarn.lock ./
RUN yarn --prod --frozen-lockfile --non-interactive
COPY --from=builder /build/backend/bin ./bin
COPY --from=builder /build/backend/lib ./lib
COPY --from=builder /build/frontend/dist/apps/huectl ./www
EXPOSE 5050
CMD [ "node", "bin/cli.js" ]