Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add share web app to Docker setup and self-hosting documentation

Anand Baburajan32814d65014d
diff --git a/docs/docs/self-hosting/administration/reverse-proxy.md b/docs/docs/self-hosting/administration/reverse-proxy.md
index 9d57586d65..7dbf93ac89 100644
--- a/docs/docs/self-hosting/administration/reverse-proxy.md
+++ b/docs/docs/self-hosting/administration/reverse-proxy.md
@@ -82,6 +82,11 @@ auth.ente.yourdomain.tld {
cast.ente.yourdomain.tld {
reverse_proxy http://localhost:3004
}
+
+# For Ente Public Locker web app
+share.ente.yourdomain.tld {
+ reverse_proxy http://localhost:3005
+}
```
## Step 3: Reload reverse proxy
diff --git a/docs/docs/self-hosting/guides/windows.md b/docs/docs/self-hosting/guides/windows.md
index 60962938d9..1c333d500e 100644
--- a/docs/docs/self-hosting/guides/windows.md
+++ b/docs/docs/self-hosting/guides/windows.md
@@ -177,6 +177,7 @@ services:
- 3000:3000 # Photos
- 3002:3002 # Albums
- 3004:3004 # Cast
+ - 3005:3005 # Share
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 5b7659b17c..9fdb5661bd 100644
--- a/docs/docs/self-hosting/installation/env-var.md
+++ b/docs/docs/self-hosting/installation/env-var.md
@@ -49,5 +49,6 @@ in `ports` in compose file.
| Ente Albums | Web | 3002 | 3002 |
| [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 |
| 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 b174feab69..baedd3c427 100644
--- a/docs/docs/self-hosting/installation/manual.md
+++ b/docs/docs/self-hosting/installation/manual.md
@@ -152,8 +152,8 @@ 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) as per your
- needs:
+3. Build the needed applications (Photos, Accounts, Auth, Cast, Public Locker) as per
+ your needs:
```shell
# These commands are executed inside web directory
@@ -168,6 +168,9 @@ git clone https://github.com/ente-io/ente
# Build cast. Build output to be served is present at apps/cast/out
yarn build:cast
+
+ # Build public locker. Build output to be served is present at apps/share/out
+ yarn build:share
```
4. Copy the output files to `/var/www/ente/apps` for easier management.
@@ -183,6 +186,8 @@ git clone https://github.com/ente-io/ente
sudo cp -r apps/auth/out /var/www/ente/apps/auth
# Cast
sudo cp -r apps/cast/out /var/www/ente/apps/cast
+ # Public Locker
+ sudo cp -r apps/share/out /var/www/ente/apps/share
```
5. Set up file server using Caddy by editing `Caddyfile`, present at
@@ -219,6 +224,18 @@ git clone https://github.com/ente-io/ente
file_server
try_files {path} {path}.html /index.html
}
+
+ :3005 {
+ root * /var/www/ente/apps/out/share
+ file_server
+ @root {
+ path /
+ }
+ handle @root {
+ try_files /index.html
+ }
+ try_files {path} {path}.html /404.html
+ }
```
The web application for Ente Photos should be accessible at
diff --git a/server/config/compose.yaml b/server/config/compose.yaml
index 6cb55c86cb..8821acc55e 100644
--- a/server/config/compose.yaml
+++ b/server/config/compose.yaml
@@ -62,13 +62,14 @@ services:
ente-web:
build:
- context: ../../web
+ context: ../../web
ports:
- 3000:3000
- 3001:3001
- 3002:3002
- 3003:3003
- 3004:3004
+ - 3005:3005
environment:
- NODE_ENV=development
env_file:
diff --git a/web/Dockerfile b/web/Dockerfile
index 4b0f4020e7..2d688ee888 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -16,6 +16,7 @@ RUN yarn build:photos
RUN yarn build:accounts
RUN yarn build:auth
RUN yarn build:cast
+RUN yarn build:share
FROM nginx
@@ -25,6 +26,7 @@ COPY --from=builder /build/apps/photos/out /out/photos
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 <<EOF /etc/nginx/conf.d/default.conf
server {
@@ -47,6 +49,11 @@ server {
listen 3004; root /out/cast;
location / { try_files \$uri \$uri.html /index.html; }
}
+server {
+ listen 3005; root /out/share;
+ location = / { try_files /index.html =404; }
+ location / { try_files \$uri \$uri.html /404.html; }
+}
EOF
EXPOSE 3000
@@ -54,6 +61,7 @@ EXPOSE 3001
EXPOSE 3002
EXPOSE 3003
EXPOSE 3004
+EXPOSE 3005
ENV ENTE_API_ORIGIN=http://localhost:8080
ENV ENTE_ALBUMS_ORIGIN=https://localhost:3002