π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update deployment instructions
Manav Rathif199ce0e8305
diff --git a/web/docs/dependencies.md b/web/docs/dependencies.mdindex ddfc681362..aad328c9af 100644--- a/web/docs/dependencies.md+++ b/web/docs/dependencies.md@@ -14,16 +14,6 @@ They also need some support packages:* "@typescript-eslint/parser" - Tells ESLint how to read TypeScript syntax* "@typescript-eslint/eslint-plugin" - Provides TypeScript rules and presets-## Node--Node is used under the hood to build the web apps. We currently use **20.11.1**.--* On production, this is ensured by setting the NODE_VERSION environment- variable in Cloudflare Pages settings.--* On your machine, you can install the the latest from the v20 series. e.g., on- macOS, you can `brew install node@20`.-## Utils### Cryptodiff --git a/web/docs/deploy.md b/web/docs/deploy.mdindex 2919b1785a..55d132da01 100644--- a/web/docs/deploy.md+++ b/web/docs/deploy.md@@ -1,44 +1,39 @@# Deploying the web apps-The various web apps (Ente Photos, Ente Auth) are deployed on Cloudflare Pages.-They also use Cloudflare Workers for some tasks.--This repository deploys multiple different apps (the Photos app, the Auth app).-Some of them get deployed to multiple different endpoints (e.g. the main branch-of photos app gets deployed to testing.ente.io, the while the photos-release-branch is the production deployment).+## tl;dr;-The apps are under the app directory:+```sh+yarn deploy:photos+```-- photos - The Ente Photos app-- auth - The Ente Auth app-- cast - The cast app, which can be thought of as an independent subset of- Photos app functionality-- ... and more+## Details-For deploying, we've added the GitHub integration provided by Cloudflare Pages-app to this repository. This integration watches for pushes to all branches. In-all cases, it runs the same script, `scripts/deploy.sh`.+The various web apps (Ente Photos, Ente Auth) are deployed on Cloudflare Pages.-Internally it uses the `CF_PAGES_BRANCH` environment variable to decide what-exactly to build ([CF+The deployment is done using the GitHub app provided by Cloudflare Pages. The+Cloudflare integration watches for pushes to all branches named "deploy/*". In+all cases, it runs the same script, `scripts/deploy.sh`, using the+`CF_PAGES_BRANCH` environment variable to decide what exactly to build ([CFdocs](https://developers.cloudflare.com/pages/how-to/build-commands-branches/)).-Then, for some special branches, we have configured CNAME aliases (Cloudflare-calls them Custom Domains) to give a stable URL to some of these deployments-Here is a potentially out of date list of CNAMEs and the corresponding branch;-see the Cloudflare dashboard for the latest:+For each of these branches, we have configured CNAME aliases (Cloudflare calls+them Custom Domains) to give a stable URL to the deployments.-- _testing.ente.io_: `main`-- _web.ente.io_: `photos-release`-- _auth.ente.io_: `auth-release`-- _accounts.ente.io_: `accounts-release`-- _cast.ente.io_: `cast-release`+- `deploy/photos` β _web.ente.io_+- `deploy/auth` β _auth.ente.io_+- `deploy/accounts` β _accounts.ente.io_+- `deploy/cast` β _cast.ente.io_Thus to trigger a, say, production deployment of the photos app, we can open and-merge a PR into the `photos-release` branch. Cloudflare will then build and+merge a PR into the `deploy/photos` branch. Cloudflare will then build anddeploy the code to _web.ente.io_.+The command `yarn deploy:photos` just does that - it'll open a new PR to fast+forward the current main onto `deploy/photos`. There are similar `yarn deploy:*`+commands for the other apps.++## Other subdomains+Apart from this, there are also some subdomains:- `albums.ente.io` is a CNAME alias to the production deployment@@ -49,14 +44,17 @@ Apart from this, there are also some subdomains:- `payments.ente.io` and `family.ente.io` are currently in a separaterepositories (Enhancement: bring them in here).-In Cloudflare Pages setting the following environment variables are defined:+## NODE_VERSION++In Cloudflare Pages setting the `NODE_VERSION` environment variables is defined.-- `NODE_VERSION`: Determines which version of Node is used when we do `yarn- build:foo`. Currently this is set to `20.11.1`. The major version here should- match that of `@types/node` in our dev dependencies.+This determines which version of Node is used when we do `yarn build:foo`.+Currently this is set to `20.11.1`. The major version here should match that of+`@types/node` in our dev dependencies.-- `SENTRY_AUTH_TOKEN`: An encrypted environment variable that is used by the- Sentry Webpack Plugin to upload sourcemaps during the build.+It is a good idea to also use the same major version of node on your machine.+For example, for macOS you can install the the latest from the v20 series using+`brew install node@20`.## Adding a new app