From ef0a0ffcede1c232c6370c51f457b66a852e9d9b Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Wed, 8 Dec 2021 10:20:18 +0100 Subject: [PATCH] docker: add migration-tool to the image --- .dockerignore | 4 +--- Dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index ae30b96..039358c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,9 +5,6 @@ # Don't track cargo generated files target/* -server/target/* -app/target/* -auth/target/* # Don't track the generated JS app/pkg/* @@ -20,6 +17,7 @@ Dockerfile README.md LICENSE docs/* +example_configs/* # Various config files that shouldn't be tracked lldap_config.toml diff --git a/Dockerfile b/Dockerfile index 6fe6f37..cd450cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,11 +31,12 @@ RUN cargo chef prepare --recipe-path /tmp/recipe.json FROM chef AS builder COPY --from=planner /tmp/recipe.json recipe.json RUN cargo chef cook --release -p lldap_app --target wasm32-unknown-unknown \ - && cargo chef cook --release -p lldap + && cargo chef cook --release -p lldap \ + && cargo chef cook --release -p migration-tool # Copy the source and build the app and server. COPY --chown=app:app . . -RUN cargo build --release -p lldap \ +RUN cargo build --release -p lldap -p migration-tool \ # Build the frontend. && ./app/build.sh @@ -47,7 +48,7 @@ WORKDIR /app COPY --from=builder /app/app/index_local.html app/index.html COPY --from=builder /app/app/static app/static COPY --from=builder /app/app/pkg app/pkg -COPY --from=builder /app/target/release/lldap lldap +COPY --from=builder /app/target/release/lldap /app/target/release/migration-tool ./ COPY docker-entrypoint.sh lldap_config.docker_template.toml ./ RUN set -x \