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

Fix the app's Dockerfile and comment it #2162

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Conversation

resolritter
Copy link
Contributor

@resolritter resolritter commented Mar 31, 2023

Description

While trying to run the app through Docker (following https://appflowy.gitbook.io/docs/essential-documentation/install-appflowy/installation-methods/installing-with-docker) I ran into the following issues:

While going through those issues and solving them, I tinkered with the image and added some comments along the way.

Trying it out

$ cd frontend/scripts/docker-buildfiles
$ docker-compose rm -fvs
$ docker image rm --force appflowy/appflowy:latest
$ docker-compose up

@resolritter
Copy link
Contributor Author

To avoid this problem from coming up again in the future, it might be worthwhile to test this Docker setup on CI. Let me know if you'd be interested in that.

@CLAassistant
Copy link

CLAassistant commented Mar 31, 2023

CLA assistant check
All committers have signed the CLA.

@LucasXu0
Copy link
Collaborator

LucasXu0 commented Apr 3, 2023

@resolritter Sure. Can you help with adding the Docker build check on CI?.

@resolritter
Copy link
Contributor Author

@resolritter Sure. Can you help with adding the Docker build check on CI?.

Alright, I'll try that. Moving to Draft in the meantime.

@resolritter resolritter marked this pull request as draft April 3, 2023 23:04
@resolritter resolritter force-pushed the docker branch 3 times, most recently from 15062d4 to 20cce18 Compare April 6, 2023 19:40
@resolritter
Copy link
Contributor Author

@LucasXu0 I think it's ready, but please take into account the following.

The CI to test docker-compose build consistently takes around 30m, as corroborated by https://github.com/resolritter/AppFlowy/actions/runs/4631817142/jobs/8195135626 and other runs of that workflow. Most of that time is unsurprinsingly spent at the Rust compilation steps; step 21 (related to step 22), which installs the Rust build tools, takes around 9 minutes; step 25 (related to Step 26), which compiles the app, takes around 19 minutes.

At first I wanted to use caching to speed up the Rust compilation, but attempting that ended up significantly increasing the code's complexity - see https://github.com/resolritter/AppFlowy/blob/docker2/.github/workflows/docker_ci.yml (which is unfinished). That's why I'm submitting the PR without any caching whatsoever. If I manage to finish and refine the caching solution, I'll submit a follow-up PR.

@resolritter resolritter marked this pull request as ready for review April 6, 2023 19:58
@LucasXu0
Copy link
Collaborator

@resolritter Thanks, it looks good to me. However, the Docker-CI is taking a lot of time. I think we should create a new issue to track and optimize it.

@LucasXu0 LucasXu0 merged commit 662d11b into AppFlowy-IO:main Apr 11, 2023
6 checks passed
@annieappflowy annieappflowy added infra engineering tasks that are not related to UX/UI features bug Something isn't working labels Apr 11, 2023
@annieappflowy annieappflowy added this to the v0.2 milestone Apr 11, 2023
@annieappflowy annieappflowy modified the milestones: v0.2, v0.1.3 Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infra engineering tasks that are not related to UX/UI features
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants