From d5869742c269cd8d4669e4f5e9154302dbad95d6 Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:05:23 +0800 Subject: [PATCH] fix: test (#339) * fix: test * fix: test * fix: test --- .github/workflows/integration_test.yml | 2 ++ Dockerfile | 5 ++++- docker-compose.yml | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 7cc574a550ff..9b88eacd5eed 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -53,6 +53,8 @@ jobs: run: | sed -i '/image: appflowyinc\/appflowy_cloud:/d' docker-compose.yml sed -i '/image: appflowyinc\/admin_frontend:/d' docker-compose.yml + sed -i 's/FEATURES: "disable_access_control"/FEATURES: ""/g' docker-compose.yml + cat docker-compose.yml - name: Run Docker-Compose run: | diff --git a/Dockerfile b/Dockerfile index e9bd534e7eab..0b1b580d3e8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,6 @@ +# Build argument for features +ARG FEATURES="" + FROM lukemathwalker/cargo-chef:latest-rust-1.75.0 as chef WORKDIR /app @@ -16,7 +19,7 @@ COPY . . ENV SQLX_OFFLINE true # Build the project -RUN cargo build --profile=profiling --features="disable_access_control" --bin appflowy_cloud +RUN cargo build --profile=profiling --features="${FEATURES}" --bin appflowy_cloud FROM debian:bookworm-slim AS runtime diff --git a/docker-compose.yml b/docker-compose.yml index c4d56e9bcc62..992364175dde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -107,6 +107,8 @@ services: build: context: . dockerfile: Dockerfile + args: + FEATURES: "disable_access_control" image: appflowyinc/appflowy_cloud:${BACKEND_VERSION:-latest} admin_frontend: