diff --git a/Dockerfile b/Dockerfile index 50ec6e53d..7a0a5fc3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-buster as build +FROM node:14-bullseye as build ENV NODE_ENV=development @@ -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"]