AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[FR] Docker support for Mac server (M1)

Open ecker00 opened this issue 3 years ago • 3 comments

Use cases of the proposed feature

  • For those running a dockerized mac server, it would be nice to host AppFlowy using Docker, instead of installing via brew.

What types of users can benefit from using your proposed feature Would be easier to maintain docker containers for Mac users (M1).

Additional context I've tried to build using the Docker instructions, but get the following error. I'm guessing this is because the image is meant for x86? Also see that the docker-compose file is referencing a lot of folders that does not exist on MacOS. Seems to fail during: Building flutter tool....

# Running:
docker-compose build --build-arg uid=$(id -u) --build-arg gid=$(id -g)

# Result:
WARN[0000] The "DISPLAY" variable is not set. Defaulting to a blank string.
[+] Building 59.8s (19/29)
 => [internal] load build definition from Dockerfile                                                                                                           0.0s
 => => transferring dockerfile: 32B                                                                                                                            0.0s
 => [internal] load .dockerignore                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                0.0s
 => [internal] load metadata for docker.io/archlinux/archlinux:latest                                                                                          1.1s
 => [internal] load metadata for docker.io/archlinux/archlinux:base-devel                                                                                      1.1s
 => [builder  1/16] FROM docker.io/archlinux/archlinux:base-devel@sha256:0e831ee0f5d23def89e79d72c21b5089511d7601044e4c751913367e25e5ff42                      0.0s
 => [stage-1 1/9] FROM docker.io/archlinux/archlinux@sha256:0805a732ca4f885a6822c2aed4ab23e51f62b5ab6bc3d6ea3442325db9cafa30                                   0.0s
 => CACHED [stage-1 2/9] RUN pacman -Syy &&     pacman -Syu --needed --noconfirm xdg-user-dirs &&     pacman -Scc --noconfirm                                  0.0s
 => CACHED [stage-1 3/9] RUN xdg-user-dirs-update                                                                                                              0.0s
 => CACHED [builder  2/16] RUN pacman -Syy                                                                                                                     0.0s
 => CACHED [builder  3/16] RUN pacman -Syu --needed --noconfirm git xdg-user-dirs                                                                              0.0s
 => CACHED [builder  4/16] RUN useradd --system --create-home makepkg   && echo "makepkg ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/makepkg                  0.0s
 => CACHED [builder  5/16] WORKDIR /home/makepkg                                                                                                               0.0s
 => CACHED [builder  6/16] RUN git clone https://aur.archlinux.org/yay.git   && cd yay   && makepkg -sri --needed --noconfirm                                  0.0s
 => CACHED [builder  7/16] RUN yay -S --noconfirm curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzip                                       0.0s
 => CACHED [builder  8/16] RUN xdg-user-dirs-update                                                                                                            0.0s
 => CACHED [builder  9/16] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y                                                         0.0s
 => CACHED [builder 10/16] RUN source $HOME/.cargo/env && rustup toolchain install stable && rustup default stable                                             0.0s
 => CACHED [builder 11/16] RUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutter                                                           0.0s
 => ERROR [builder 12/16] RUN flutter channel stable                                                                                                          58.7s
------
 > [builder 12/16] RUN flutter channel stable:
#0 0.990 Downloading Linux x64 Dart SDK from Flutter engine d0f4a4cf09c6977617e1ec675bbb9baca6be06cb...
#0 1.112   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#0 1.113                                  Dload  Upload   Total   Spent    Left  Speed
100  206M  100  206M    0     0  26.8M      0  0:00:07  0:00:07 --:--:-- 30.3M
#0 20.09 Building flutter tool...
#0 57.98
#0 57.98 ===== CRASH =====
#0 57.98 si_signo=Trace/breakpoint trap(5), si_code=128, si_addr=(nil)
#0 57.98 version=2.19.0-151.0.dev (dev) (Mon Aug 29 20:15:35 2022 -0700) on "linux_x64"
#0 57.98 pid=502, thread=510, isolate_group=kernel-service(0x400310c000), isolate=kernel-service(0x400310d000)
#0 57.98 os=linux, arch=x64, comp=no, sim=no
#0 57.98 isolate_instructions=ffffa7ab9000, vm_instructions=4001ef4600
#0 57.98   pc 0x0000ffffa5b04e09 fp 0x000000400c4251f0 Unknown symbol
#0 57.98   pc 0x0000ffffa5b00c03 fp 0x000000400c425288 Unknown symbol
#0 57.98   pc 0x0000ffffa5b7fe6f fp 0x000000400c4252e0 Unknown symbol
#0 57.98   pc 0x0000ffffa5b00814 fp 0x000000400c425310 Unknown symbol
#0 57.98   pc 0x0000ffffa5b7fd5f fp 0x000000400c425348 Unknown symbol
#0 57.98   pc 0x0000ffffa5b7fc80 fp 0x000000400c4253a8 Unknown symbol
#0 57.98   pc 0x0000ffffa5b006f8 fp 0x000000400c425418 Unknown symbol
#0 57.98   pc 0x0000ffffa5b73217 fp 0x000000400c425468 Unknown symbol
#0 57.98   pc 0x0000ffffa7f63d2e fp 0x000000400c4254a8 Unknown symbol
#0 57.98   pc 0x0000ffffa7f3c58a fp 0x000000400c425510 Unknown symbol
#0 57.98   pc 0x0000ffffa7f63d12 fp 0x000000400c425558 Unknown symbol
#0 57.98   pc 0x0000ffffa7f6019d fp 0x000000400c4255c8 Unknown symbol
#0 57.98   pc 0x0000ffffa7f63c25 fp 0x000000400c425608 Unknown symbol
#0 57.98   pc 0x0000ffffa7f3c58a fp 0x000000400c425670 Unknown symbol
#0 57.98   pc 0x0000ffffa7f63d12 fp 0x000000400c4256b8 Unknown symbol
#0 57.98   pc 0x0000ffffa7f65e8a fp 0x000000400c4256e8 Unknown symbol
#0 57.98   pc 0x0000ffffa7f5ccda fp 0x000000400c425730 Unknown symbol
#0 57.98   pc 0x0000ffffa7f5d24b fp 0x000000400c425790 Unknown symbol
#0 57.98   pc 0x0000ffffa7f63ff5 fp 0x000000400c4257d8 Unknown symbol
#0 57.98   pc 0x0000ffffa7f674ad fp 0x000000400c425840 Unknown symbol
#0 57.98   pc 0x0000ffffa81defb8 fp 0x000000400c425930 Unknown symbol
#0 57.98   pc 0x0000ffffa81e63a4 fp 0x000000400c4259b8 Unknown symbol
#0 57.98   pc 0x0000ffffa5b7fb47 fp 0x000000400c425a20 Unknown symbol
#0 57.98   pc 0x0000ffffa761d970 fp 0x000000400c425ab8 Unknown symbol
#0 57.98   pc 0x0000ffffa763b2cf fp 0x000000400c425bf0 Unknown symbol
#0 57.98   pc 0x0000ffffa8242697 fp 0x000000400c425c90 Unknown symbol
#0 57.98   pc 0x0000ffffa7640ed7 fp 0x000000400c425cd0 Unknown symbol
#0 57.98   pc 0x0000ffffa824be11 fp 0x000000400c425d58 Unknown symbol
#0 57.98   pc 0x0000ffffa7636e5e fp 0x000000400c425dc8 Unknown symbol
#0 57.98   pc 0x0000ffffa824f52d fp 0x000000400c425e60 Unknown symbol
#0 57.98   pc 0x0000ffffa82e00c5 fp 0x000000400c425eb0 Unknown symbol
#0 57.98   pc 0x0000ffffa7b97959 fp 0x000000400c425f28 Unknown symbol
#0 57.98   pc 0x0000ffffa7b97c6c fp 0x000000400c425f90 Unknown symbol
#0 57.98   pc 0x0000ffffa7b99c96 fp 0x000000400c426028 Unknown symbol
#0 57.98   pc 0x0000ffffa82df6a3 fp 0x000000400c426078 Unknown symbol
#0 57.98   pc 0x0000ffffa82d7521 fp 0x000000400c4260e8 Unknown symbol
#0 57.98   pc 0x0000ffffa82d76f9 fp 0x000000400c426148 Unknown symbol
#0 57.98   pc 0x0000ffffa7b968c3 fp 0x000000400c4261d8 Unknown symbol
#0 57.98   pc 0x0000ffffa7b981e0 fp 0x000000400c426228 Unknown symbol
#0 57.98   pc 0x0000ffffa82ddf7f fp 0x000000400c426270 Unknown symbol
#0 57.98   pc 0x0000ffffa82de0ce fp 0x000000400c4262b0 Unknown symbol
#0 57.98   pc 0x0000ffffa82de309 fp 0x000000400c4262d8 Unknown symbol
#0 57.98   pc 0x0000ffffa7b932be fp 0x000000400c426318 Unknown symbol
#0 57.98   pc 0x0000ffffa7b94a65 fp 0x000000400c426398 Unknown symbol
#0 57.98   pc 0x0000ffffa7b9129d fp 0x000000400c4263d0 Unknown symbol
#0 57.98   pc 0x0000ffffa7b9135c fp 0x000000400c426400 Unknown symbol
#0 57.98   pc 0x0000ffffa7b93caf fp 0x000000400c426468 Unknown symbol
#0 57.98   pc 0x0000ffffa83b9033 fp 0x000000400c4264b8 Unknown symbol
#0 57.98   pc 0x0000ffffa8482a0c fp 0x000000400c426530 Unknown symbol
#0 57.99   pc 0x000000400206e8ad fp 0x000000400c4265d0 dart::DartEntry::InvokeCode(dart::Code const&, unsigned long, dart::Array const&, dart::Array const&, dart::Thread*)+0x14d
#0 57.99   pc 0x000000400206e6fc fp 0x000000400c426630 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x14c
#0 57.99   pc 0x0000004002070b1c fp 0x000000400c426680 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&)+0x14c
#0 57.99   pc 0x0000004002096b90 fp 0x000000400c426c20 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x350
#0 57.99   pc 0x00000040020c006d fp 0x000000400c426c90 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x14d
#0 57.99   pc 0x00000040020c074f fp 0x000000400c426ce0 dart::MessageHandler::TaskCallback()+0x1df
#0 57.99   pc 0x00000040021e4d48 fp 0x000000400c426d60 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x148
#0 58.00   pc 0x00000040021e519d fp 0x000000400c426d90 dart::ThreadPool::Worker::Main(unsigned long)+0x6d
#0 58.00   pc 0x0000004002158ef8 fp 0x000000400c426e50 /home/makepkg/.local/flutter/bin/cache/dart-sdk/bin/dart+0x2158ef8
#0 58.00 -- End of DumpStackTrace
#0 58.00 qemu: uncaught target signal 6 (Aborted) - core dumped
#0 58.40 /home/makepkg/.local/flutter/bin/internal/shared.sh: line 165:   502 Aborted                 "$DART" --verbosity=error --disable-dart-dev $FLUTTER_TOOL_ARGS --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" --no-enable-mirrors "$SCRIPT_PATH"
------
failed to solve: executor failed running [/bin/sh -c flutter channel stable]: exit code: 134


ecker00 avatar Aug 30 '22 12:08 ecker00

This issue may be closed. Seems I've misunderstood the current configuration of AppFlowy being a native MacOS app without a server. I expected to setup a web server, and access the app via any browser (thus trying to install via Docker).

ecker00 avatar Aug 30 '22 12:08 ecker00

I'm trying to install AppFlowy as server too. So do I understand correctly, it's only a desktop app? A wanted this to be accessible from more than one place, like Notion.

SonGokussj4 avatar Sep 05 '22 07:09 SonGokussj4

That is correct. On the Discord I heard they will be working on the backend Q4 2022. I imagine it will take quite a while to get everything fitting together. — At the moment Outline is an alternative.

ecker00 avatar Sep 11 '22 19:09 ecker00

wanna try our latest self-hosting solution? https://docs.appflowy.io/docs/guides/appflowy/self-hosting-appflowy

annieappflowy avatar Dec 24 '23 18:12 annieappflowy