mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-10-31 01:54:37 +00:00 
			
		
		
		
	 243f80b6d5
			
		
	
	
		243f80b6d5
		
			
		
	
	
	
	
		
			
			* chore: remove use of svgWidget() * refactor: redundant code in svg * feat: add generator to generate flowy_svgs.g.dart * chore: reference new package in pubspec * chore: remove svg widget from flowy_infra * refactor: update usage in flowy_infra_ui * refactor: usage in appflowy_flutter * fix: error with script not running * fix: error with script not running * fix: use unix style file path * feat: use generation script for flowy svgs * feat: add task * fix: add required missing semicolon * fix: rebase errors * feat: update generate build script * fix: solve duplicate entries in the generated file * fix: compilation errors * fix: replace all spaces with an underscore * feat: use FlowySvgs * feat: reduce assets and simplify * refactor: do not return empty svg widget * fix: rebase errors * fix: analyzer warnings * chore: remove flowy_icons from tracking * chore: fix generate flowy icons script linux * chore: macos/linux script * chore: add rsync --------- Co-authored-by: Mathias Mogensen <mathiasrieckm@gmail.com> Co-authored-by: Mathias Mogensen <mathias@appflowy.io>
		
			
				
	
	
		
			93 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			93 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| #================
 | |
| # BUILDER
 | |
| #================
 | |
| 
 | |
| FROM archlinux/archlinux:base-devel as builder
 | |
| RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
 | |
| 
 | |
| # Upgrade the system
 | |
| RUN pacman -Syyu --noconfirm
 | |
| 
 | |
| # Set up makepkg user and workdir
 | |
| ARG user=makepkg
 | |
| RUN pacman -S --needed --noconfirm sudo
 | |
| RUN useradd --system --create-home $user && \
 | |
|     echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
 | |
| ENV PATH="/home/$user/.pub-cache/bin:/home/$user/flutter/bin:/home/$user/flutter/bin/cache/dart-sdk/bin:${PATH}"
 | |
| USER $user
 | |
| WORKDIR /home/$user
 | |
| 
 | |
| # Install yay
 | |
| RUN sudo pacman -S --needed --noconfirm curl tar
 | |
| RUN curl -sSfL \
 | |
|     --output yay.tar.gz \
 | |
|     https://github.com/Jguer/yay/releases/download/v12.0.2/yay_12.0.2_x86_64.tar.gz && \
 | |
|   tar -xf yay.tar.gz && \
 | |
|   sudo mv yay_12.0.2_x86_64/yay /bin && \
 | |
|   rm -rf yay_12.0.2_x86_64 && \
 | |
|   yay --version
 | |
| 
 | |
| # Install Rust
 | |
| RUN yay -S --noconfirm curl base-devel openssl clang cmake ninja pkg-config xdg-user-dirs
 | |
| RUN xdg-user-dirs-update
 | |
| RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
 | |
| RUN source ~/.cargo/env && \
 | |
|     rustup toolchain install 1.70 && \
 | |
|     rustup default 1.70
 | |
| 
 | |
| # Install Flutter
 | |
| RUN sudo pacman -S --noconfirm git tar gtk3
 | |
| RUN curl -sSfL \
 | |
|       --output flutter.tar.xz \
 | |
|       https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.1-stable.tar.xz && \
 | |
|     tar -xf flutter.tar.xz && \
 | |
|     rm flutter.tar.xz
 | |
| RUN flutter config --enable-linux-desktop
 | |
| RUN flutter doctor
 | |
| RUN dart pub global activate protoc_plugin 20.0.1
 | |
| 
 | |
| # Install build dependencies for AppFlowy
 | |
| RUN sudo pacman -S --noconfirm git libkeybinder3 sqlite clang rsync
 | |
| RUN source ~/.cargo/env && cargo install --force cargo-make duckscript_cli
 | |
| 
 | |
| # Build AppFlowy
 | |
| COPY . /appflowy
 | |
| RUN sudo chown -R $user: /appflowy
 | |
| WORKDIR /appflowy
 | |
| RUN cd frontend && \
 | |
|     source ~/.cargo/env && \
 | |
|     cargo make appflowy-flutter-deps-tools && \
 | |
|     cargo make flutter_clean && \
 | |
|     cargo make -p production-linux-x86_64 appflowy-linux
 | |
| 
 | |
| 
 | |
| #================
 | |
| # APP
 | |
| #================
 | |
| 
 | |
| FROM archlinux/archlinux
 | |
| 
 | |
| # Upgrade the system
 | |
| RUN pacman -Syyu --noconfirm
 | |
| 
 | |
| # Install runtime dependencies
 | |
| RUN pacman -S --noconfirm xdg-user-dirs gtk3 libkeybinder3 && \
 | |
|     pacman -Scc --noconfirm
 | |
| 
 | |
| # Set up appflowy user
 | |
| ARG user=appflowy
 | |
| ARG uid=1000
 | |
| ARG gid=1000
 | |
| RUN groupadd --gid $gid $user
 | |
| RUN useradd --create-home --uid $uid --gid $gid $user
 | |
| USER $user
 | |
| 
 | |
| # Set up the AppFlowy app
 | |
| WORKDIR /home/$user
 | |
| COPY --from=builder /appflowy/frontend/appflowy_flutter/build/linux/x64/release/bundle .
 | |
| RUN xdg-user-dirs-update && \
 | |
|     test -e ./AppFlowy && \
 | |
|     file ./AppFlowy
 | |
| 
 | |
| CMD ["./AppFlowy"]
 |