AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Question] Any plans for a Docker image?

Open sfkpmr opened this issue 5 years ago • 36 comments

I see .dockerignore, but no Dockerfile. Would love to see one!

sfkpmr avatar Nov 16 '21 07:11 sfkpmr

@sfkpmr what do you propose the use of Docker for? (building? hosting flutter as a pwa or something - not a flutter expert)

stemount avatar Nov 16 '21 08:11 stemount

@sfkpmr maybe I don't want to install Rust on my machine, maybe I just want to download the docker images and run the app on my local environment without installing any dependency... also docker containers can be used to deploy the app faster on tons of boxes. if some developer is using M1 and doesn't have a dependency or is just running Linux docker will have all dependencies already built in, configured and ready to run. Docker is a must

nicolasdanelon avatar Nov 16 '21 08:11 nicolasdanelon

@sfkpmr The docker file is used to deploy the AppFlowy backend on the local host.

appflowy avatar Nov 16 '21 08:11 appflowy

Would you guys be open to a Pull Request for a docker-compose and some Dockerfiles ?

I was thinking that it would help local development in the wild to have a docker-compose that launches the db, the backend and the frontend (never dockerized a flutter app but should be possible).

Edit: i'm checking the database scripts. The idea would be to simplify this logic so that random developers can launch the project in a very simple and straight forward way

franciscoafonsoo avatar Nov 16 '21 12:11 franciscoafonsoo

Yes, please! The Rust+Flutter stack isn't that common nowadays and having to spend more than 1 hour (my case so far) for installing all the Rust and Flutter dependencies, plus compiling... is discouraging, unless you have been waiting for a Notion open source clone for years!

With Docker it would be super easy and fast to just fetch AppFlowy and run it

PabloCastellano avatar Nov 16 '21 12:11 PabloCastellano

Please DO create the Docker Image we are interested in hosting it on our servers.

ghost avatar Nov 16 '21 14:11 ghost

Please DO create the Docker Image we are also VERY interested.

It has taken more than 3 hours to install all dependencies so far without success.

huangxinping avatar Nov 16 '21 15:11 huangxinping

Would you guys be open to a Pull Request for a docker-compose and some Dockerfiles ?

I was thinking that it would help local development in the wild to have a docker-compose that launches the db, the backend and the frontend (never dockerized a flutter app but should be possible).

Edit: i'm checking the database scripts. The idea would be to simplify this logic so that random developers can launch the project in a very simple and straight forward way

We're definitely open to PRs. To understand this better, do you want a docker backend or both the backend and the frontend?

annieappflowy avatar Nov 16 '21 15:11 annieappflowy

Yes, please! The Rust+Flutter stack isn't that common nowadays and having to spend more than 1 hour (my case so far) for installing all the Rust and Flutter dependencies, plus compiling... is discouraging, unless you have been waiting for a Notion open source clone for years!

With Docker it would be super easy and fast to just fetch AppFlowy and run it

Love how you put this all together - I can feel your pain now :( Let's just keep discussing this topic in this thread until we land on a nice solution :D

annieappflowy avatar Nov 16 '21 15:11 annieappflowy

@annieappflowy An image for both would be awesome!

sfkpmr avatar Nov 16 '21 15:11 sfkpmr

Please DO create the Docker Image we are also VERY interested.

It has taken more than 3 hours to install all dependencies so far without success.

Please join our Discord channel, and I believe some pro hackers can help you out there

annieappflowy avatar Nov 16 '21 15:11 annieappflowy

@franciscoafonsoo It seems possible to docker the flutter desktop application. https://hub.docker.com/r/openpriv/flutter-desktop

I use docker to host the backend on my laptop to develop the frontend, but I didn't set up the Dockerfile.

appflowy avatar Nov 16 '21 15:11 appflowy

Guys, PRs for this are welcomed :D

appflowy avatar Nov 16 '21 15:11 appflowy

Yes, docker is very needed to run it

i-iooi-i avatar Nov 16 '21 15:11 i-iooi-i

@franciscoafonsoo It seems possible to docker the flutter desktop application. https://hub.docker.com/r/openpriv/flutter-desktop

I use docker to host the backend on my laptop to develop the frontend, but I didn't set up the Dockerfile.

I will then join discord and discuss some things !

franciscoafonsoo avatar Nov 16 '21 17:11 franciscoafonsoo

So i will start with something very simple:

  • docker-compose definition for the backend and the database. something like this
version: "3.8"

services:
  backend:
    image: appflowy-backend
    build:
      context: ./backend
      dockerfile: Dockerfile

    ports:
      - 8080:8080

  database:
    image: postgres:14.1-bullseye
    environment:
      DB_USER: postgres
      DB_PASSWORD: password
      DB_NAME: flowy
      DB_PORT: 5433

    ports:
      - 5433:5433

I am reading the db scripts to understand what needs to be done. But should look something like that. After having that done, it's a matter of exploring flutter docker and connecting it.

Is the existing rust Dockerfile working ? @appflowy

franciscoafonsoo avatar Nov 16 '21 17:11 franciscoafonsoo

+1 for this

esturniolo avatar Nov 17 '21 02:11 esturniolo

@franciscoafonsoo Wow, it seems ok to me. Have you tried it?

  • The existing Dockerfile does not work anymore.

appflowy avatar Nov 17 '21 02:11 appflowy

another +1 for this!! a docker container would make it that much easier to set up and run on any server

HawksRepos avatar Nov 17 '21 22:11 HawksRepos

+1

little idea, let's volume data to the local. so we can easily back up. or, users can volume path to apple iCloud path, so data can sync between the company and home easily.

by the way, don't forget to support M1. 😁

adamzhoul avatar Nov 18 '21 15:11 adamzhoul