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

[FR] Self-hosted : bundle web app in Cloud distribution #873

Open
almereyda opened this issue Oct 13, 2024 · 9 comments
Open

[FR] Self-hosted : bundle web app in Cloud distribution #873

almereyda opened this issue Oct 13, 2024 · 9 comments
Assignees

Comments

@almereyda
Copy link

almereyda commented Oct 13, 2024

Describe the bug

The release of v0.7.1 has seen the ascent of a feature to collaborate on the web. With the frontend in the apps and for a local build needing to adapt to a self-hosted AppFlowy-Cloud instance at runtime AppFlowy-IO/AppFlowy#6539 comes also the need, that the web app is bundled with the Cloud distribution.

Right now for #680 it is possible to work around the present limitations in the client AppFlowy-IO/AppFlowy#5920 with building a heavily monkey-patched app that is able to show the static content of a published page.

Ideally the manual build-time modifications aren't necessary and AppFlowy-Cloud comes with a web app (build pipeline), that allows to adapt to the URL of the AppFlowy instance it is published with.

To Reproduce
Steps to reproduce the behavior:

  1. Open the AppFlowy App
  2. Click on Invite to collaborate and copy the link.
  3. Paste the link into the browser's address bar and replace appflowy.com with your custom URL of the web frontend
  4. Click on one of the enabled authentication providers and be redirected into the app.

Expected behavior

AppFlowy opens in the browser and it is possible to edit the document.

Desktop (please complete the following information):

  • OS: Flatpak
  • Browser Firefox
  • Version v0.7.1

Additional Context

We have four highly related tracking issues for two features in two projects now:

Feature AppFlowy AppFlowy Cloud
Share to web AppFlowy-IO/AppFlowy#5920 #680
Collaborate on web AppFlowy-IO/AppFlowy#6539 <this one>
@khorshuheng
Copy link
Collaborator

Yes, this is indeed a popular request. For the first step, i will need to setup the github action to build and publish the docker image for appflowy web. After that i will add the additional service to docker compose.

Changes to AppFlowy Flutter app to provide a setting for custom appflowy web url will come later, though, as that will require additional effort.

@almereyda
Copy link
Author

almereyda commented Oct 27, 2024

There are more aspects, which can be considered for dynamic configuration of the Flutter app:

Also I would like to continue to encourage a less "inviting" ("nudging") stance for published pages, providing less/no sign up or log in links. AppFlowy-IO/AppFlowy#5920 (comment)

Following on with

it appears useful to consider

as well. The Flutter app could adapt to the available authentication options when using a self-hosted AppFlowy-Cloud instance with custom authentication configuration.

@almereyda
Copy link
Author

almereyda commented Jan 10, 2025

With the recent web related commits in this repository, a separate AppFlowy-Web repository has emerged. It contains a Dockerfile for a container which is not yet published to Docker Hub (nor the GitHub Container Registry at ghcr.io). The instructions for the image do not yet give any indication, if or how the custom domain name of a self-hosted instance is to be made recognised by the web app. Eventually it just works?

We'd need to run it and reproduce, whether the found artefacts and build instructions help to replace the earlier manual build of a patched web frontend #680 (comment).

References

@khorshuheng
Copy link
Collaborator

khorshuheng commented Jan 10, 2025

As the endpoint for AppFlowy Cloud is determined during the time the image is built (via .env), as opposed to run time variable, we are not able to create a Appflowy Web docker image that can fit every deployment. So currently, the recommended approach is to set your Appflowy cloud URL in the .env file for AppFlowy Web repo, then use the makefile to build an image, which you can then deploy.

That being said, we are also planning to release an official image for Appflowy web, that is configured to work with Appflowy cloud deployed on localhost (which can be set up via docker compose up), so that it's easier for user to evaluate AppFlowy Web via a reproducible set up.

Another alternative would be to use a platform like Vercel to deploy AppFlowy Web, though that certainly has some limitations (Eg. Only works with Appflowy cloud endpoint exposed publicly)

@wx-11
Copy link

wx-11 commented Jan 11, 2025

https://appflowy.com/docs/self-host-appflowy-web-install-docker The tutorial has been released, but this issue hasn't been closed yet. Are there any unfinished tasks? Can I deploy it through the web as described in the tutorial?

@khorshuheng
Copy link
Collaborator

There are improvements needed, such as ability of building the image without pnpm being installed on host machine, simplifying the installation process, and better documentation. But yes , it is possible to deploy the web app as described.

@bdruth
Copy link

bdruth commented Jan 11, 2025

@wx-11 I am clearly missing something, but if I pull main, the Makefile has no target to make image

❯ git pull
Already up to date.
❯ make image
make: *** No rule to make target 'image'.  Stop.
❯ git remote -v
origin  https://github.com/AppFlowy-IO/AppFlowy-Cloud (fetch)
origin  https://github.com/AppFlowy-IO/AppFlowy-Cloud (push)

@luxio
Copy link

luxio commented Jan 11, 2025

@wx-11 I am clearly missing something, but if I pull main, the Makefile has no target to make image

I think the you should run make image within the AppFlowy-Web repository.

@bdruth
Copy link

bdruth commented Jan 11, 2025

@luxio - ty! Didn't realize there was another repo, much obliged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants