3.1 KiB
3.1 KiB
Work in Progress
This documentation is currently under development and subject to updates.
Building
Web Deployment (via Docker)
Materialious supports web deployment through Docker.
- The build process starts with the Dockerfile.
- Placeholder environment variables are injected into a
.envfile, which are later replaced by the replace_env_vars.sh script. - The application is served using NGINX, configured with nginx.conf.
- Deployment and building are handled via docker/build-push-action@v5 using the workflow defined in prod-web.yml.
Desktop Release (via GitHub Releases)
Materialious desktop builds are handled through GitHub using prod-desktop.yml.
- First, the typical build steps are run:
npm installandnpm run build. - We utilize Capacitor with
@capacitor-community/electronto integrate Electron into the project. The commandnpx cap sync @capacitor-community/electronis used to synchronize the latest build. - The patch_capacitor_plugin.py script removes the Capacitor-NodeJS plugin from the desktop build, as it's not required and currently has no better alternative.
- From here, the process follows standard electron-builder steps to complete the build.
Desktop Release (via Flatpak)
Flatpak builds for desktop releases are managed via us.materailio.app.
- We generate the necessary remote npm packages with
flatpak-node-generator npm -r ../materialious/package-lock.json -R ../materialious/electron/package-lock.json, which creates generated-sources.json. - The Linux x64 runtime is downloaded as part of the Flatpak build sources and placed in
main/materialious/electron/.electron-cache. The electron-builder.config.json is configured to use this cache directory to avoid downloading the runtime again during the build. - The build process is similar to prod-desktop.yml, following the guidelines for Flatpak Electron.
Android Release
Android builds are handled using the workflow prod-android.yml.
- After running the standard
npm installandnpm run buildcommands, we install the modules located in nodejs-android/ for Capacitor-NodeJS. - The
npx cap synccommand is used to synchronize with Capacitor. - The Android build is processed using setup-java, followed by signing the APK with sign-android-release.