π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Clarify a few things around running shared albums locally
Manav Rathi53a92a58e3d9
diff --git a/apps/photos/.env.development b/apps/photos/.env.developmentindex 2bf16f4d86..18c1d8da86 100644--- a/apps/photos/.env.development+++ b/apps/photos/.env.development@@ -44,12 +44,18 @@# The URL for the shared albums deployment#-# Currently the shared albums code is intermixed with the photos app code; when-# deploying, we add an a CNAME alias from "albums.ente.io" -> "/shared-album".+# The shared albums are served from the photos app code, and "albums.ente.io" is+# a CNAME alias to the main photo app itself. Depending on the query params, the+# root page redirects to "/shared-album".+#+# The port here will be :3002 if we run it using `yarn dev:albums`, and :3000 if+# we run it using `yarn dev:photos` (the code running the same is both cases,+# only the port it is exposed on is different).## Enhancement: Consider splitting this into a separate app/ in this repository.+# That can also reduce bundle sizes and make it load faster.#-# NEXT_PUBLIC_ENTE_ALBUM_ENDPOINT = http://localhost:3002+# NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002# The URL of the family plans web app deployment#diff --git a/apps/photos/.env.localhost b/apps/photos/.env.localhostnew file mode 100644index 0000000000..96c59df554--- /dev/null+++ b/apps/photos/.env.localhost@@ -0,0 +1,17 @@+# Develop against a server running on localhost+#+# Copy this file to `.env`. Then if you run a local instance of the web client+# with `yarn dev:photos`, it will connect to a locally running instance of the+# server. Not everything will work, you might need to set other env vars (see+# `.env.development`), but it should give you a usable baseline setup.+#+# Equivalent CLI command using environment variables would be+#+# NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3000 NEXT_PUBLIC_ENTE_DIRECT_UPLOAD=true yarn dev:photos+#++NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080+NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3000+# Uncomment this if running using yarn dev:albums+# NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002+NEXT_PUBLIC_ENTE_DIRECT_UPLOAD = truediff --git a/apps/photos/package.json b/apps/photos/package.jsonindex d1c9319c39..f676d33234 100644--- a/apps/photos/package.json+++ b/apps/photos/package.json@@ -2,11 +2,6 @@"name": "photos","version": "0.0.0","private": true,- "scripts": {- "dev": "next dev",- "build": "next build",- "albums": "next dev -p 3002"- },"dependencies": {"@/ui": "*","@/utils": "*",diff --git a/package.json b/package.jsonindex 5a035c620b..d03c3211fa 100644--- a/package.json+++ b/package.json@@ -17,7 +17,7 @@"dev:auth": "yarn workspace auth next dev","dev:cast": "yarn workspace cast next dev","dev:photos": "yarn workspace photos next dev",- "albums": "yarn workspace photos albums",+ "dev:albums": "yarn workspace photos next dev -p 3002","lint": "yarn prettier --check . && yarn workspaces run eslint .","lint-fix": "yarn prettier --write . && yarn workspaces run eslint --fix ."},diff --git a/packages/shared/network/api.ts b/packages/shared/network/api.tsindex 27232917c2..e6f62b2c0e 100644--- a/packages/shared/network/api.ts+++ b/packages/shared/network/api.ts@@ -79,7 +79,7 @@ export const getPaymentsURL = () => {};export const getAlbumsURL = () => {- const albumsURL = process.env.NEXT_PUBLIC_ENTE_ALBUM_ENDPOINT;+ const albumsURL = process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT;if (albumsURL) {return albumsURL;}