Skip to content

Commit

Permalink
Merge pull request #563 from dhis2/fix-build
Browse files Browse the repository at this point in the history
ci(docker): update dockerfile to use build step node_modules
  • Loading branch information
varl authored Oct 4, 2021
2 parents 6a09f97 + e47cace commit 9c9d5ae
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14-buster as build
FROM node:14-bullseye as build

ENV NODE_ENV=development

Expand All @@ -13,17 +13,17 @@ RUN yarn workspace client pack --filename app-hub-client.tgz
RUN tar zxvf client/app-hub-client.tgz --directory server/
RUN mv server/package/build server/static && rm -rf server/package

FROM node:14-buster-slim
# runtime image
FROM node:14-bullseye-slim

ENV NODE_ENV=production
ENV HOST=0.0.0.0

# copy the entire project folder
WORKDIR /srv
COPY --from=build /src ./apphub

COPY --from=build /src/server ./app-hub

WORKDIR app-hub
RUN yarn install --frozen-lockfile

# run the app
WORKDIR apphub
EXPOSE 3000
CMD ["node", "src/main.js"]
CMD ["node", "server/src/main.js"]

0 comments on commit 9c9d5ae

Please sign in to comment.