From f22dd4535ddcd239404150d85e72a8b13d1e6124 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Wed, 13 Nov 2024 06:12:39 -0500 Subject: [PATCH] revert dockerfile to working state --- Dockerfile | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index d999194..0c848b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,4 @@ -# Stage: monolith-builder -# Purpose: Uses the Rust image to build monolith -# Notes: -# - Fine to leave extra here, as only the resulting binary is copied out -FROM docker.io/rust:1.80-bullseye AS monolith-builder - -RUN set -eux && cargo install --locked monolith - -# Stage: main-app -# Purpose: Compiles the frontend and -# Notes: -# - Nothing extra should be left here. All commands should cleanup -FROM node:18.18-bullseye-slim AS main-app +FROM node:18.18-bullseye-slim ARG DEBIAN_FRONTEND=noninteractive @@ -20,18 +8,30 @@ WORKDIR /data COPY ./package.json ./yarn.lock ./playwright.config.ts ./ -RUN --mount=type=cache,sharing=locked,target=/usr/local/share/.cache/yarn \ - set -eux && \ - yarn install --network-timeout 10000000 +RUN --mount=type=cache,sharing=locked,target=/usr/local/share/.cache/yarn yarn install --network-timeout 10000000 -# Copy the compiled monolith binary from the builder stage -COPY --from=monolith-builder /usr/local/cargo/bin/monolith /usr/local/bin/monolith +RUN apt-get update -RUN set -eux && \ - npx playwright install --with-deps chromium && \ +RUN apt-get install -y \ + build-essential \ + curl \ + libssl-dev \ + pkg-config + +RUN apt-get update + +RUN curl https://sh.rustup.rs -sSf | bash -s -- -y + +ENV PATH="/root/.cargo/bin:${PATH}" + +RUN cargo install monolith + +RUN npx playwright install-deps && \ apt-get clean && \ yarn cache clean +RUN yarn playwright install + COPY . . RUN yarn prisma generate && \ @@ -39,4 +39,4 @@ RUN yarn prisma generate && \ EXPOSE 3000 -CMD yarn prisma migrate deploy && yarn start +CMD yarn prisma migrate deploy && yarn start \ No newline at end of file