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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
config server docker
appflowy952ac1cd3c33
diff --git a/.dockerignore b/.dockerignorenew file mode 100644index 0000000000..96d83807ed--- /dev/null+++ b/.dockerignore@@ -0,0 +1,7 @@+.env+.dockerignore+doc/+scripts/+rust-lib/target/+backend/target/+app_flowy/\ No newline at end of filediff --git a/backend/.dockerignore b/backend/.dockerignorenew file mode 100644index 0000000000..1719710ae1--- /dev/null+++ b/backend/.dockerignore@@ -0,0 +1,10 @@+.env+.dockerignore+spec.yaml+target/+deploy/+tests/+Dockerfile+scripts/+migrations/+app_flowy/\ No newline at end of filediff --git a/backend/Cargo.toml b/backend/Cargo.tomlindex 987f1184c5..f9e05582dc 100644--- a/backend/Cargo.toml+++ b/backend/Cargo.toml@@ -42,7 +42,8 @@ features = ["postgres","uuid","chrono",- "migrate"+ "migrate",+ "offline",]diff --git a/backend/Dockerfile b/backend/Dockerfilenew file mode 100644index 0000000000..b572ff6108--- /dev/null+++ b/backend/Dockerfile@@ -0,0 +1,15 @@+# We use the latest Rust stable release as base image+FROM rust:1.53.0+# 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.+WORKDIR /app+# Copy all files from our working environment to our Docker image++COPY . .+# Let's build our binary!+# We'll use the release profile to make it faaaast+WORKDIR /app/backend+RUN cargo build --release+# When `docker run` is executed, launch the binary!+ENTRYPOINT ["./target/release/backend"]diff --git a/backend/doc/database_setup.md b/backend/doc/database_setup.mdindex 44ac3d83d0..86c25a06c5 100644--- a/backend/doc/database_setup.md+++ b/backend/doc/database_setup.md@@ -2,6 +2,7 @@### Docker+1. follow the [instructions](https://docs.docker.com/desktop/mac/install/) to install docker.2. open terminal and run: `docker pull postgres`@@ -25,4 +26,6 @@ export DB_NAME=flowyexport DB_PORT=5433```-\ No newline at end of file+++[Docker command](https://docs.docker.com/engine/reference/commandline/builder_prune/)\ No newline at end of filediff --git a/rust-lib/dart-ffi/Cargo.toml b/rust-lib/dart-ffi/Cargo.tomlindex b29f4558cf..3132ea54aa 100644--- a/rust-lib/dart-ffi/Cargo.toml+++ b/rust-lib/dart-ffi/Cargo.toml@@ -7,11 +7,11 @@ edition = "2018"[lib]name = "dart_ffi"# this value will change depending on the target os-# for iOS it would be `cdylib`-# for Macos it would be `cdylib`+# for iOS it would be `rlib`+# for Macos it would be `rlib`# for android it would be `c-dylib`-# default cdylib-crate-type = ["cdylib"]+# default rlib+crate-type = ["rlib"][dependencies]diff --git a/rust-lib/flowy-dispatch/src/errors/errors.rs b/rust-lib/flowy-dispatch/src/errors/errors.rsindex 34bd3a6d45..051d5bfd26 100644--- a/rust-lib/flowy-dispatch/src/errors/errors.rs+++ b/rust-lib/flowy-dispatch/src/errors/errors.rs@@ -7,7 +7,7 @@ use bytes::Bytes;use dyn_clone::DynClone;use protobuf::ProtobufError;use serde::{Serialize, Serializer};-use std::{fmt, option::NoneError};+use std::fmt;use tokio::{sync::mpsc::error::SendError, task::JoinError};pub trait Error: fmt::Debug + DynClone + Send + Sync {@@ -53,12 +53,6 @@ impl From<SendError<EventRequest>> for DispatchError {}}-impl From<NoneError> for DispatchError {- fn from(s: NoneError) -> Self {- InternalError::UnexpectedNone(format!("Unexpected none: {:?}", s)).into()- }-}-impl From<String> for DispatchError {fn from(s: String) -> Self { InternalError::Other(s).into() }}diff --git a/rust-lib/flowy-dispatch/src/lib.rs b/rust-lib/flowy-dispatch/src/lib.rsindex 5e0da9ac9a..779db9a6f2 100644--- a/rust-lib/flowy-dispatch/src/lib.rs+++ b/rust-lib/flowy-dispatch/src/lib.rs@@ -1,5 +1,3 @@-#![feature(try_trait)]-mod errors;mod module;mod request;