diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..75eecae --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM fossa/haskell-static-alpine:ghc-8.10.4 AS build + +ARG SLAM_GIT_REPO=https://github.com/jantuomi/slam-interpreter.git +ARG SLAM_GIT_CHECKOUT=main + +RUN cabal update +RUN git clone $SLAM_GIT_REPO /slam +WORKDIR /slam +RUN git checkout $SLAM_GIT_CHECKOUT +RUN ls src && cabal build --enable-executable-static +RUN mv $(cabal list-bin slam-interpreter) ./interpreter + +FROM node:16-alpine AS serve + +ENV NODE_ENV production +ENV PORT 8080 + +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci --only-prod +COPY --from=build /slam/interpreter ./ +COPY src ./src +CMD ["npm", "start"] |
