Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Any plans for a Docker image? #13

Closed
sfkpmr opened this issue Nov 16, 2021 · 36 comments · Fixed by #66
Closed

[Question] Any plans for a Docker image? #13

sfkpmr opened this issue Nov 16, 2021 · 36 comments · Fixed by #66
Labels
new feature New feature or request

Comments

@sfkpmr
Copy link

sfkpmr commented Nov 16, 2021

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

@stemount
Copy link

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

@nicolasdanelon
Copy link

@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

@appflowy
Copy link
Contributor

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

@franciscoafonsoo
Copy link

franciscoafonsoo commented Nov 16, 2021

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

@PabloCastellano
Copy link
Contributor

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

@ghost
Copy link

ghost commented Nov 16, 2021

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

@huangxinping
Copy link

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.

@annieappflowy
Copy link
Collaborator

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
Copy link
Collaborator

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

@sfkpmr
Copy link
Author

sfkpmr commented Nov 16, 2021

@annieappflowy An image for both would be awesome!

@annieappflowy
Copy link
Collaborator

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

@appflowy
Copy link
Contributor

appflowy commented Nov 16, 2021

@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
Copy link
Contributor

Guys, PRs for this are welcomed :D

@i-iooi-i
Copy link

Yes, docker is very needed to run it

@franciscoafonsoo
Copy link

@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
Copy link

franciscoafonsoo commented Nov 16, 2021

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

@esturniolo
Copy link

+1 for this

@appflowy
Copy link
Contributor

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

  • The existing Dockerfile does not work anymore.

@HawksRepos
Copy link

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

@adamzhoul
Copy link

adamzhoul commented Nov 18, 2021

+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. 😁

@pramadito
Copy link

+1

i would love to develop full stack with docker

@juangburgos
Copy link

+1

@polypixeldev
Copy link
Contributor

+1
Is there a PR in progress for this?

@annieappflowy annieappflowy added new feature New feature or request help wanted for the community members to claim labels Nov 20, 2021
This was referenced Nov 21, 2021
@annieappflowy annieappflowy linked a pull request Nov 22, 2021 that will close this issue
@annieappflowy annieappflowy removed a link to a pull request Nov 22, 2021
@annieappflowy annieappflowy linked a pull request Nov 22, 2021 that will close this issue
@tborychowski
Copy link

tborychowski commented Nov 25, 2021

There's a whole community of self-hosters who would love to take this for a spin! :-D

@HawksRepos
Copy link

Yeah we would be keen to do a video on this if we could get a working docker container running on the unraid platform (we can add the template on your behalf if needed) - https://youtube.com/c/IBRACORP

@felipefideli
Copy link

+1

@armin771
Copy link

Yeah we would be keen to do a video on this if we could get a working docker container running on the unraid platform (we can add the template on your behalf if needed) - https://youtube.com/c/IBRACORP

That would be fantastic. Would love to get it running on my end under unraid.

@0xN0x
Copy link
Contributor

0xN0x commented Dec 1, 2021

+1

@lirc572
Copy link

lirc572 commented Dec 3, 2021

I think it would be more useful to be able to also run the flutter desktop app itself in a docker container during development and display the GUI on the host machine, because it will allow us to use flutter's hot reload for development.

This link is a good reference on how to run GUI apps in a container. Not sure if it will be easy to apply it to the flutter desktop toolchain though.

A web (PWA) version would of course be much easier to run/develop with docker.

@appflowy
Copy link
Contributor

appflowy commented Dec 5, 2021

The backend docker image is ready. Run
make docker_image

image

image

I couldn't find the method to run the GUI desktop application build with flutter in Docker, but I'll keep trying. I'm working on the frontend part that enables communication with the backend. Let me know if I'm on the right track to meet your needs.

@irfanbacker
Copy link
Contributor

I couldn't find the method to run the GUI desktop application build with flutter in Docker, but I'll keep trying. I'm working on the frontend part that enables communication with the backend. Let me know if I'm on the right track to meet your needs.

I don't think there is a straightforward way to do it. Users might have to do some external setup to get GUI applications working on docker. Besides, i don't think there is a usecase here. Users could easily use the release zips to run the frontend. If its for easier building, maybe a docker image with mounted folder could be used and the build could be output in the folder.

@antoineozenne
Copy link

I think a docker-compose to launch all the stack (back, front, db) would be great to promote the application. Today, I wanted to test the application on Ubuntu, but there is no "one-command test". In addition, Rust and Flutter are still fairly new, and not everyone is perfectly comfortable with these technologies. While a docker-compose...

@MikeWallaceDev
Copy link
Contributor

This thread needs a conclusion. There seems to be bits and pieces, but no clear outcome. Can someone write up a blogpost/wiki that explains what our docker containers can do, how to install them, and how to use them? If a PR is needed, let's get that done too. Then we can close this issue.

Who would like to take the lead on this?

@nicolasdanelon @appflowy @franciscoafonsoo @annieappflowy @adamzhoul @lirc572 @antoineozenne

@armin771
Copy link

Would it be possible to make the Docker available on DockerHub? Then it would be easy to set up AppFlowy on Unraid.

@MikeWallaceDev MikeWallaceDev removed the help wanted for the community members to claim label Dec 26, 2021
@MikeWallaceDev
Copy link
Contributor

Hello,
A Docker file was created and documented by @rushic24, thanks!

You can find install information here.

@JoyceBabu
Copy link

JoyceBabu commented Aug 24, 2022

Hello, A Docker file was created and documented by @rushic24, thanks!

You can find install information here.

The wiki link is redirecting to the GitHub project home page. Is this no longer supported?

Edit: Found the new link here

839900146 pushed a commit to 839900146/AppFlowy that referenced this issue Jun 6, 2024
* feat: ci: dockerize gotrue auth server

* feat: build: add gotrue to docker-compose

* fix: build: docker-compose + test

* feat: ci: simplify tests

* feat: ci: add back needed services for compilation

* fix: ci: github secrets

* fix: ci: use signup

* fix: ci: add export

* fix: test: generate unique email for registration to avoid conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.