Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

add(self-hosting):adding-memories

Aswin Asokba46f054d00a
diff --git a/docs/docs/self-hosting/administration/reverse-proxy.md b/docs/docs/self-hosting/administration/reverse-proxy.md
index 510ceb622a..532b2ebcb9 100644
--- a/docs/docs/self-hosting/administration/reverse-proxy.md
+++ b/docs/docs/self-hosting/administration/reverse-proxy.md
@@ -92,6 +92,11 @@ share.ente.yourdomain.tld {
embed.ente.yourdomain.tld {
reverse_proxy http://localhost:3006
}
+
+# For Ente Memories web app
+memories.ente.yourdomain.tld {
+ reverse_proxy http://localhost:3010
+}
```
## Step 3: Reload reverse proxy
diff --git a/docs/docs/self-hosting/guides/windows.md b/docs/docs/self-hosting/guides/windows.md
index 4176669224..1f05743590 100644
--- a/docs/docs/self-hosting/guides/windows.md
+++ b/docs/docs/self-hosting/guides/windows.md
@@ -119,6 +119,9 @@ apps:
public-albums: http://localhost:3002
# public-albums: http://192.168.1.42:3002
# public-albums: https://albums.mydomain.com
+ public-memories: http://localhost:3010
+ # public-memories: http://192.168.1.42:3010
+ # public-memories: https://memories.mydomain.com
cast: http://localhost:3004
# cast: http://192.168.1.42:3004
# cast: https://cast.mydomain.com
@@ -180,6 +183,7 @@ services:
- 3005:3005 # Share
- 3006:3006 # Embed
- 3008:3008 # Paste
+ - 3010:3010 # Memories
environment:
ENTE_API_ORIGIN: http://localhost:8080
# ENTE_API_ORIGIN: http://192.168.1.42:8080
@@ -187,6 +191,9 @@ services:
ENTE_ALBUMS_ORIGIN: http://localhost:3002
# ENTE_ALBUMS_ORIGIN: http://192.168.1.42:3002
# ENTE_ALBUMS_ORIGIN: https://albums.mydomain.com
+ ENTE_MEMORIES_ORIGIN: http://localhost:3010
+ # ENTE_MEMORIES_ORIGIN: http://192.168.1.42:3010
+ # ENTE_MEMORIES_ORIGIN: https://memories.mydomain.com
ENTE_PHOTOS_ORIGIN: http://localhost:3000
# ENTE_PHOTOS_ORIGIN: http://192.168.1.42:3000
# ENTE_PHOTOS_ORIGIN: https://photos.mydomain.com
diff --git a/docs/docs/self-hosting/installation/config.md b/docs/docs/self-hosting/installation/config.md
index 0fdd3a0230..918099457f 100644
--- a/docs/docs/self-hosting/installation/config.md
+++ b/docs/docs/self-hosting/installation/config.md
@@ -62,7 +62,7 @@ above and `ENTE_S3_B2_EU_CEN_ENDPOINT` overrides `s3.b2-eu-cen.endpoint`.
### App Endpoints
-The web apps for Ente (Accounts, Cast, Albums, Share, Paste, Embed) use
+The web apps for Ente (Accounts, Cast, Albums, Share, Paste, Embed, Memories) use
different endpoints.
These endpoints are configurable in `museum.yaml` under the apps.\* section.
@@ -71,14 +71,15 @@ Upon configuration, the application will start utilizing the specified endpoints
instead of Ente's production instances or local endpoints (overridden values
used for Compose and quickstart for ease of use.)
-| Variable | Description | Default |
-| -------------------- | ------------------------------------------------------- | -------------------------- |
-| `apps.public-albums` | Albums app base endpoint for public sharing | `https://albums.ente.io` |
-| `apps.public-locker` | Public Locker (share) app base endpoint | `https://share.ente.io` |
-| `apps.public-paste` | Ente Paste app base endpoint | `https://paste.ente.com` |
-| `apps.cast` | Cast app base endpoint | `https://cast.ente.io` |
-| `apps.embed-albums` | Embed app base endpoint for embedded sharing | `https://embed.ente.io` |
-| `apps.accounts` | Accounts app base endpoint (used for passkey-based 2FA) | `https://accounts.ente.io` |
+| Variable | Description | Default |
+| ---------------------- | ------------------------------------------------------- | -------------------------- |
+| `apps.public-albums` | Albums app base endpoint for public sharing | `https://albums.ente.io` |
+| `apps.public-locker` | Public Locker (share) app base endpoint | `https://share.ente.io` |
+| `apps.public-paste` | Ente Paste app base endpoint | `https://paste.ente.com` |
+| `apps.public-memories` | Memories app base endpoint for public memory shares | `https://memories.ente.io` |
+| `apps.cast` | Cast app base endpoint | `https://cast.ente.io` |
+| `apps.embed-albums` | Embed app base endpoint for embedded sharing | `https://embed.ente.io` |
+| `apps.accounts` | Accounts app base endpoint (used for passkey-based 2FA) | `https://accounts.ente.io` |
### Database
diff --git a/docs/docs/self-hosting/installation/env-var.md b/docs/docs/self-hosting/installation/env-var.md
index a2a4ad742e..623461e223 100644
--- a/docs/docs/self-hosting/installation/env-var.md
+++ b/docs/docs/self-hosting/installation/env-var.md
@@ -20,16 +20,17 @@ the web apps.
Here's the list of environment variables that is used by the cluster:
-| Service | Environment Variable | Description | Default Value |
-| ---------- | --------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------- |
-| `web` | `ENTE_API_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_ENDPOINT`. API Endpoint for Ente's API (Museum). | http://localhost:8080 |
-| `web` | `ENTE_ALBUMS_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT`. Base URL for the Ente Albums app, used for public sharing. | http://localhost:3002 |
-| `web` | `ENTE_PHOTOS_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT`. Base URL for Ente Photos web app. | http://localhost:3000 |
-| `postgres` | `POSTGRES_USER` | Username for PostgreSQL database | `pguser` |
-| `postgres` | `POSTGRES_DB` | Name of database for use with Ente | `ente_db` |
-| `postgres` | `POSTGRES_PASSWORD` | Password for PostgreSQL database's user | Randomly generated (quickstart) |
-| `minio` | `MINIO_ROOT_USER` | Username for MinIO | Randomly generated (quickstart) |
-| `minio` | `MINIO_ROOT_PASSWORD` | Password for MinIO | Randomly generated (quickstart) |
+| Service | Environment Variable | Description | Default Value |
+| ---------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
+| `web` | `ENTE_API_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_ENDPOINT`. API Endpoint for Ente's API (Museum). | http://localhost:8080 |
+| `web` | `ENTE_ALBUMS_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT`. Base URL for the Ente Albums app, used for public sharing. | http://localhost:3002 |
+| `web` | `ENTE_MEMORIES_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_MEMORIES_ENDPOINT`. Base URL for the Ente Memories app, used for public memory shares. | http://localhost:3010 |
+| `web` | `ENTE_PHOTOS_ORIGIN` | Alias for `NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT`. Base URL for Ente Photos web app. | http://localhost:3000 |
+| `postgres` | `POSTGRES_USER` | Username for PostgreSQL database | `pguser` |
+| `postgres` | `POSTGRES_DB` | Name of database for use with Ente | `ente_db` |
+| `postgres` | `POSTGRES_PASSWORD` | Password for PostgreSQL database's user | Randomly generated (quickstart) |
+| `minio` | `MINIO_ROOT_USER` | Username for MinIO | Randomly generated (quickstart) |
+| `minio` | `MINIO_ROOT_PASSWORD` | Password for MinIO | Randomly generated (quickstart) |
## Default Configuration
@@ -45,16 +46,17 @@ container and related services. The mapping is of the format
If you are using `quickstart.sh`, note that only `3000` (Photos) and `3002`
(Albums) are exposed by default.
-| Service | Type | Host Port | Container Port |
-| ------------------------------------------------------- | -------- | --------- | -------------- |
-| Museum | Server | 8080 | 8080 |
-| Ente Photos | Web | 3000 | 3000 |
-| Ente Accounts | Web | 3001 | 3001 |
-| Ente Albums | Web | 3002 | 3002 |
+| Service | Type | Host Port | Container Port |
+| -------------------------------------------------------- | -------- | --------- | -------------- |
+| Museum | Server | 8080 | 8080 |
+| Ente Photos | Web | 3000 | 3000 |
+| Ente Accounts | Web | 3001 | 3001 |
+| Ente Albums | Web | 3002 | 3002 |
| [Ente Auth](https://ente.com/auth/) | Web | 3003 | 3003 |
| [Ente Cast](https://ente.com/help/photos/features/cast/) | Web | 3004 | 3004 |
-| Ente Public Locker | Web | 3005 | 3005 |
-| Ente Embed | Web | 3006 | 3006 |
-| Ente Paste (if deployed separately) | Web | 3008 | 3008 |
-| MinIO | S3 | 3200 | 3200 |
-| PostgreSQL | Database | | 5432 |
+| Ente Public Locker | Web | 3005 | 3005 |
+| Ente Embed | Web | 3006 | 3006 |
+| Ente Paste (if deployed separately) | Web | 3008 | 3008 |
+| Ente Memories | Web | 3010 | 3010 |
+| MinIO | S3 | 3200 | 3200 |
+| PostgreSQL | Database | | 5432 |
diff --git a/docs/docs/self-hosting/installation/manual.md b/docs/docs/self-hosting/installation/manual.md
index efe9a6bb27..b1c31e675d 100644
--- a/docs/docs/self-hosting/installation/manual.md
+++ b/docs/docs/self-hosting/installation/manual.md
@@ -190,11 +190,13 @@ Values you used for `database name` and `username` correspond to the values you
export NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080
# Replace this with actual endpoint for Albums
export NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3002
+ # Replace this with actual endpoint for Memories
+ export NEXT_PUBLIC_ENTE_MEMORIES_ENDPOINT=http://localhost:3010
# Replace this with actual endpoint for Photos
export NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT=http://localhost:3000
```
3. Build the needed applications (Photos, Albums, Accounts, Auth, Cast, Public
- Locker, Embed) as per your needs:
+ Locker, Embed, Memories) as per your needs:
```shell
# These commands are executed inside web directory
@@ -218,6 +220,9 @@ Values you used for `database name` and `username` correspond to the values you
# Build embed. Build output to be served is present at apps/embed/out
yarn build:embed
+
+ # Build memories. Build output to be served is present at apps/memories/out
+ yarn build:memories
```
4. Copy the output files to `/var/www/ente/apps` for easier management.
@@ -239,6 +244,8 @@ Values you used for `database name` and `username` correspond to the values you
sudo cp -r apps/share/out /var/www/ente/apps/share
# Embed
sudo cp -r apps/embed/out /var/www/ente/apps/embed
+ # Memories
+ sudo cp -r apps/memories/out /var/www/ente/apps/memories
```
5. Set up file server using Caddy by editing `Caddyfile`, present at
@@ -287,6 +294,12 @@ Values you used for `database name` and `username` correspond to the values you
file_server
try_files {path} {path}.html /index.html
}
+
+ :3010 {
+ root * /var/www/ente/apps/memories
+ file_server
+ try_files {path} {path}.html /index.html
+ }
```
::: tip Important for Share App
diff --git a/docs/docs/self-hosting/installation/post-install/index.md b/docs/docs/self-hosting/installation/post-install/index.md
index 0522a18ac9..463a73a9b3 100644
--- a/docs/docs/self-hosting/installation/post-install/index.md
+++ b/docs/docs/self-hosting/installation/post-install/index.md
@@ -107,15 +107,16 @@ apps:
public-albums: https://albums.ente.yourdomain.tld
public-locker: https://share.ente.yourdomain.tld
public-paste: https://paste.ente.yourdomain.tld
+ public-memories: https://memories.ente.yourdomain.tld
cast: https://cast.ente.yourdomain.tld
embed-albums: https://embed.ente.yourdomain.tld
accounts: https://accounts.ente.yourdomain.tld
```
If you are using quickstart, note that only Photos and Albums are exposed by
-default in `compose.yaml`. Uncomment the Share / Paste port mappings there, or
-deploy them separately, before pointing `apps.public-locker` /
-`apps.public-paste` to those URLs.
+default in `compose.yaml`. Uncomment the Share / Paste / Memories port mappings
+there, or deploy them separately, before pointing `apps.public-locker` /
+`apps.public-paste` / `apps.public-memories` to those URLs.
## Step 4: Make it publicly accessible
diff --git a/server/config/compose.yaml b/server/config/compose.yaml
index 074dc5874b..8167c0fea7 100644
--- a/server/config/compose.yaml
+++ b/server/config/compose.yaml
@@ -73,6 +73,7 @@ services:
- 3005:3005
- 3006:3006
- 3008:3008
+ - 3010:3010
environment:
- NODE_ENV=development
env_file:
diff --git a/server/config/example.env b/server/config/example.env
index 71860689f9..bb3f7cd104 100644
--- a/server/config/example.env
+++ b/server/config/example.env
@@ -28,4 +28,5 @@ MINIO_ROOT_PASSWORD=<secret>
# Replace the below endpoints to the correct subdomains of your choice.
ENTE_API_ORIGIN=http://localhost:8080
ENTE_ALBUMS_ORIGIN=http://localhost:3002
+ENTE_MEMORIES_ORIGIN=http://localhost:3010
ENTE_PHOTOS_ORIGIN=http://localhost:3000
diff --git a/server/config/example.yaml b/server/config/example.yaml
index 159e8bcc12..742d138e3c 100644
--- a/server/config/example.yaml
+++ b/server/config/example.yaml
@@ -60,6 +60,9 @@ apps:
# If you're running a self hosted instance and wish to serve Ente Paste,
# set this to the URL where your paste web app is running.
public-paste: http://localhost:3008
+ # If you're running a self hosted instance and wish to serve public memory
+ # shares, set this to the URL where your memories web app is running.
+ public-memories: http://localhost:3010
cast: http://localhost:3004
embed-albums: http://localhost:3006
# Set this to the URL where your accounts web app is running, primarily used for
diff --git a/web/Dockerfile b/web/Dockerfile
index 5e90563b40..ad3057b743 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -16,6 +16,7 @@ WORKDIR /build/web
ENV NEXT_PUBLIC_ENTE_ENDPOINT=ENTE_API_ORIGIN_PLACEHOLDER
ENV NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=ENTE_ALBUMS_ORIGIN_PLACEHOLDER
+ENV NEXT_PUBLIC_ENTE_MEMORIES_ENDPOINT=ENTE_MEMORIES_ORIGIN_PLACEHOLDER
ENV NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT=ENTE_PHOTOS_ORIGIN_PLACEHOLDER
# `yarn install` is flaky on the GitHub arm64 runners otherwise.
@@ -31,6 +32,7 @@ RUN yarn build:cast
RUN yarn build:share
RUN yarn build:embed
RUN yarn build:paste
+RUN yarn build:memories
FROM nginx
@@ -44,6 +46,7 @@ COPY --from=builder /build/web/apps/cast/out /out/cast
COPY --from=builder /build/web/apps/share/out /out/share
COPY --from=builder /build/web/apps/embed/out /out/embed
COPY --from=builder /build/web/apps/paste/out /out/paste
+COPY --from=builder /build/web/apps/memories/out /out/memories
COPY <<EOF /etc/nginx/conf.d/default.conf
server {
@@ -78,6 +81,10 @@ server {
listen 3008; root /out/paste;
location / { try_files \$uri \$uri.html /index.html; }
}
+server {
+ listen 3010; root /out/memories;
+ location / { try_files \$uri \$uri.html /index.html; }
+}
EOF
EXPOSE 3000
@@ -88,9 +95,11 @@ EXPOSE 3004
EXPOSE 3005
EXPOSE 3006
EXPOSE 3008
+EXPOSE 3010
ENV ENTE_API_ORIGIN=http://localhost:8080
ENV ENTE_ALBUMS_ORIGIN=http://localhost:3002
+ENV ENTE_MEMORIES_ORIGIN=http://localhost:3010
ENV ENTE_PHOTOS_ORIGIN=http://localhost:3000
COPY <<EOF /docker-entrypoint.d/90-replace-ente-env.sh
@@ -104,6 +113,8 @@ find /out/photos -name '*.js' |
xargs sed -i'' "s#ENTE_PHOTOS_ORIGIN_PLACEHOLDER#\$ENTE_PHOTOS_ORIGIN#g"
find /out/albums -name '*.js' |
xargs sed -i'' "s#ENTE_PHOTOS_ORIGIN_PLACEHOLDER#\$ENTE_PHOTOS_ORIGIN#g"
+find /out/memories -name '*.js' |
+ xargs sed -i'' "s#ENTE_MEMORIES_ORIGIN_PLACEHOLDER#\$ENTE_MEMORIES_ORIGIN#g"
EOF
RUN chmod +x /docker-entrypoint.d/90-replace-ente-env.sh
diff --git a/web/docs/docker.md b/web/docs/docker.md
index 1a3fa351db..2187a40d60 100644
--- a/web/docs/docker.md
+++ b/web/docs/docker.md
@@ -3,7 +3,7 @@
Automated Docker images for the self-hosting web apps are created every
Wednesday. You can fetch them from `ghcr.io/ente-io/web`.
-These images expose 8 web apps on the following ports:
+These images expose 9 web apps on the following ports:
- `3000` - Photos
- `3001` - Accounts
@@ -13,6 +13,7 @@ These images expose 8 web apps on the following ports:
- `3005` - Share
- `3006` - Embed
- `3008` - Paste
+- `3010` - Memories
For example, for selectively exposing only the photos web app on your port 8000,
you could:
@@ -21,7 +22,7 @@ you could:
docker run -it --rm -p 8000:3000 ghcr.io/ente-io/web
```
-These images accept three environment variables to allow you to customize them:
+These images accept four environment variables to allow you to customize them:
- `ENTE_API_ORIGIN` - The API origin (scheme://host:port) for your API server.
Default: "http://localhost:8080".
@@ -34,6 +35,10 @@ These images accept three environment variables to allow you to customize them:
hosted. This is used for features like join album links. Default:
"http://localhost:3000".
+- `ENTE_MEMORIES_ORIGIN` - The externally visible origin where the memories app
+ is hosted. This is used for public memory share links and memories app
+ redirects. Default: "http://localhost:3010".
+
For example, if your API server is running at `https://api.example.org`, you can
configure your Docker image to connect to it: