Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add embed app to self-hosting setup

Anand Baburajanadcaeb9dfd1d
diff --git a/docs/docs/self-hosting/administration/reverse-proxy.md b/docs/docs/self-hosting/administration/reverse-proxy.md
index 7dbf93ac89..510ceb622a 100644
--- a/docs/docs/self-hosting/administration/reverse-proxy.md
+++ b/docs/docs/self-hosting/administration/reverse-proxy.md
@@ -87,6 +87,11 @@ cast.ente.yourdomain.tld {
share.ente.yourdomain.tld {
reverse_proxy http://localhost:3005
}
+
+# For Ente Embed web app
+embed.ente.yourdomain.tld {
+ reverse_proxy http://localhost:3006
+}
```
## Step 3: Reload reverse proxy
diff --git a/docs/docs/self-hosting/guides/windows.md b/docs/docs/self-hosting/guides/windows.md
index 1c333d500e..7bc5b331c6 100644
--- a/docs/docs/self-hosting/guides/windows.md
+++ b/docs/docs/self-hosting/guides/windows.md
@@ -178,6 +178,7 @@ services:
- 3002:3002 # Albums
- 3004:3004 # Cast
- 3005:3005 # Share
+ - 3006:3006 # Embed
environment:
ENTE_API_ORIGIN: http://localhost:8080
# ENTE_API_ORIGIN: http://192.168.1.42:8080
diff --git a/docs/docs/self-hosting/installation/env-var.md b/docs/docs/self-hosting/installation/env-var.md
index 9fdb5661bd..20852661f6 100644
--- a/docs/docs/self-hosting/installation/env-var.md
+++ b/docs/docs/self-hosting/installation/env-var.md
@@ -50,5 +50,6 @@ in `ports` in compose file.
| [Ente Auth](https://ente.io/auth/) | Web | 3003 | 3003 |
| [Ente Cast](https://ente.io/help/photos/features/cast/) | Web | 3004 | 3004 |
| Ente Public Locker | Web | 3005 | 3005 |
+| Ente Embed | Web | 3006 | 3006 |
| 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 baedd3c427..37b71dc2cf 100644
--- a/docs/docs/self-hosting/installation/manual.md
+++ b/docs/docs/self-hosting/installation/manual.md
@@ -152,7 +152,7 @@ git clone https://github.com/ente-io/ente
# Replace this with actual endpoint for Albums
export NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3002
```
-3. Build the needed applications (Photos, Accounts, Auth, Cast, Public Locker) as per
+3. Build the needed applications (Photos, Accounts, Auth, Cast, Public Locker, Embed) as per
your needs:
```shell
@@ -171,6 +171,9 @@ git clone https://github.com/ente-io/ente
# Build public locker. Build output to be served is present at apps/share/out
yarn build:share
+
+ # Build embed. Build output to be served is present at apps/embed/out
+ yarn build:embed
```
4. Copy the output files to `/var/www/ente/apps` for easier management.
@@ -188,6 +191,8 @@ git clone https://github.com/ente-io/ente
sudo cp -r apps/cast/out /var/www/ente/apps/cast
# Public Locker
sudo cp -r apps/share/out /var/www/ente/apps/share
+ # Embed
+ sudo cp -r apps/embed/out /var/www/ente/apps/embed
```
5. Set up file server using Caddy by editing `Caddyfile`, present at
@@ -236,6 +241,12 @@ git clone https://github.com/ente-io/ente
}
try_files {path} {path}.html /404.html
}
+
+ :3006 {
+ root * /var/www/ente/apps/out/embed
+ file_server
+ try_files {path} {path}.html /index.html
+ }
```
The web application for Ente Photos should be accessible at
diff --git a/server/config/compose.yaml b/server/config/compose.yaml
index 8821acc55e..064c1adb34 100644
--- a/server/config/compose.yaml
+++ b/server/config/compose.yaml
@@ -70,6 +70,7 @@ services:
- 3003:3003
- 3004:3004
- 3005:3005
+ - 3006:3006
environment:
- NODE_ENV=development
env_file:
diff --git a/server/quickstart.sh b/server/quickstart.sh
index 6b042a728b..0e41d8feb6 100755
--- a/server/quickstart.sh
+++ b/server/quickstart.sh
@@ -102,6 +102,8 @@ services:
- 3002:3002 # Public albums
# - 3003:3003 # Auth
# - 3004:3004 # Cast
+ # - 3005:3005 # Share
+ # - 3006:3006 # Embed
# Modify these values to your custom subdomains, if using any
environment:
ENTE_API_ORIGIN: http://localhost:8080
diff --git a/web/Dockerfile b/web/Dockerfile
index 2d688ee888..503a51f256 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -17,6 +17,7 @@ RUN yarn build:accounts
RUN yarn build:auth
RUN yarn build:cast
RUN yarn build:share
+RUN yarn build:embed
FROM nginx
@@ -27,6 +28,7 @@ COPY --from=builder /build/apps/accounts/out /out/accounts
COPY --from=builder /build/apps/auth/out /out/auth
COPY --from=builder /build/apps/cast/out /out/cast
COPY --from=builder /build/apps/share/out /out/share
+COPY --from=builder /build/apps/embed/out /out/embed
COPY <<EOF /etc/nginx/conf.d/default.conf
server {
@@ -54,6 +56,10 @@ server {
location = / { try_files /index.html =404; }
location / { try_files \$uri \$uri.html /404.html; }
}
+server {
+ listen 3006; root /out/embed;
+ location / { try_files \$uri \$uri.html /index.html; }
+}
EOF
EXPOSE 3000
@@ -62,6 +68,7 @@ EXPOSE 3002
EXPOSE 3003
EXPOSE 3004
EXPOSE 3005
+EXPOSE 3006
ENV ENTE_API_ORIGIN=http://localhost:8080
ENV ENTE_ALBUMS_ORIGIN=https://localhost:3002