Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix backend build

Vladislav Nepogodinf21cd52f2640
diff --git a/backend/Dockerfile b/backend/Dockerfile
index dc50419889..368d090250 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -1,5 +1,4 @@
-
-FROM rust:1.53.0
+FROM rust:1.56.1
# Let's switch our working directory to `app` (equivalent to `cd app`)
# The `app` folder will be created for us by Docker in case it does not
# exist already.
@@ -10,7 +9,7 @@ COPY . .
WORKDIR /app/backend
ENV SQLX_OFFLINE true
ENV APP_ENVIRONMENT production
-RUN cargo build --release
+RUN RUSTFLAGS="-C opt-level=2" cargo build --release
# When `docker run` is executed, launch the binary!
ENTRYPOINT ["./target/release/backend"]
diff --git a/backend/src/entities/token.rs b/backend/src/entities/token.rs
index 52cb545659..0c65f99753 100644
--- a/backend/src/entities/token.rs
+++ b/backend/src/entities/token.rs
@@ -80,7 +80,7 @@ use backend_service::config::HEADER_TOKEN;
use futures::future::{ready, Ready};
impl FromRequest for Token {
- type Config = ();
+ //type Config = ();
type Error = ServerError;
type Future = Ready<Result<Self, Self::Error>>;
diff --git a/backend/src/service/user/logged_user.rs b/backend/src/service/user/logged_user.rs
index cab12f2304..256b1643fc 100644
--- a/backend/src/service/user/logged_user.rs
+++ b/backend/src/service/user/logged_user.rs
@@ -41,7 +41,7 @@ use actix_web::{dev::Payload, FromRequest, HttpRequest};
use futures::future::{ready, Ready};
impl FromRequest for LoggedUser {
- type Config = ();
+ //type Config = ();
type Error = ServerError;
type Future = Ready<Result<Self, Self::Error>>;