mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-03-30 15:08:29 +00:00
fix: get rid of caching
This commit is contained in:
parent
f337ee0643
commit
e0203c660d
@ -12,3 +12,4 @@ src/cache_buster_data.json
|
||||
browser/target
|
||||
browser/cobertura.xml
|
||||
browser/docs
|
||||
**/target
|
||||
|
20
Dockerfile
20
Dockerfile
@ -1,7 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
FROM node:18.0.0 as frontend
|
||||
RUN set -ex; \
|
||||
apt-get update; \
|
||||
@ -21,33 +20,16 @@ COPY Makefile /src/
|
||||
COPY scripts /src/scripts
|
||||
RUN make frontend
|
||||
|
||||
FROM rust:latest as planner
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR /src
|
||||
COPY . /src/
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM rust:latest as cacher
|
||||
WORKDIR /src/
|
||||
RUN cargo install cargo-chef
|
||||
COPY --from=planner /src/recipe.json recipe.json
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
|
||||
FROM rust:latest as rust
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
COPY --from=cacher /src/target target
|
||||
#COPY --from=cacher /src/db/db-core/target /src/db/db-core/target
|
||||
#COPY --from=cacher /src/db/db-sqlx-postgres/target /src/db/db-sqlx-postgres/target
|
||||
#COPY --from=cacher /src/db/db-migrations/target /src/db/db-migrations/target
|
||||
#COPY --from=cacher /src/utils/cache-bust/target /src/utils/cache-bust/target
|
||||
COPY --from=frontend /src/static/cache/bundle/ /src/static/cache/bundle/
|
||||
COPY --from=frontend /src/docs/openapi/dist/ /src/docs/openapi/dist/
|
||||
RUN cargo --version
|
||||
RUN make cache-bust
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:bullseye as mCaptcha
|
||||
FROM debian:bookworm as mCaptcha
|
||||
LABEL org.opencontainers.image.source https://github.com/mCaptcha/mCaptcha
|
||||
RUN useradd -ms /bin/bash -u 1001 mcaptcha
|
||||
WORKDIR /home/mcaptcha
|
||||
|
Loading…
x
Reference in New Issue
Block a user