Merge pull request #845 from linkwarden/dev

revert dockerfile to working state
This commit is contained in:
Daniel 2024-11-13 06:14:46 -05:00 committed by GitHub
commit de38eb2963
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,16 +1,4 @@
# Stage: monolith-builder FROM node:18.18-bullseye-slim
# 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
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@ -20,18 +8,30 @@ WORKDIR /data
COPY ./package.json ./yarn.lock ./playwright.config.ts ./ COPY ./package.json ./yarn.lock ./playwright.config.ts ./
RUN --mount=type=cache,sharing=locked,target=/usr/local/share/.cache/yarn \ RUN --mount=type=cache,sharing=locked,target=/usr/local/share/.cache/yarn yarn install --network-timeout 10000000
set -eux && \
yarn install --network-timeout 10000000
# Copy the compiled monolith binary from the builder stage RUN apt-get update
COPY --from=monolith-builder /usr/local/cargo/bin/monolith /usr/local/bin/monolith
RUN set -eux && \ RUN apt-get install -y \
npx playwright install --with-deps chromium && \ 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 && \ apt-get clean && \
yarn cache clean yarn cache clean
RUN yarn playwright install
COPY . . COPY . .
RUN yarn prisma generate && \ RUN yarn prisma generate && \
@ -39,4 +39,4 @@ RUN yarn prisma generate && \
EXPOSE 3000 EXPOSE 3000
CMD yarn prisma migrate deploy && yarn start CMD yarn prisma migrate deploy && yarn start