Skip to content

armgit / ente

Public Imported from GitHub
0

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

Placeholder

Manav Rathia80c724d0f9d
diff --git a/web/Dockerfile b/web/Dockerfile
index e201e7be7b..494a9e7780 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -3,6 +3,9 @@ FROM node:20-alpine AS builder
WORKDIR /build
COPY . .
+ENV NEXT_PUBLIC_ENTE_ENDPOINT=ENTE_API_ORIGIN_PLACEHOLDER
+ENV NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=ENTE_ALBUMS_ORIGIN_PLACEHOLDER
+
RUN yarn install
RUN yarn build:photos
RUN yarn build:accounts
@@ -50,9 +53,11 @@ EXPOSE 3004
ENV ENTE_API_ORIGIN=http://localhost:8080
ENV ENTE_ALBUMS_ORIGIN=https://localhost:3002
-COPY <<EOF /docker-entrypoint.d/replace-ente-env.sh
-find /out -name '*.js' | xargs sed -i'' "s#https://api.ente.io#\$ENTE_API_ORIGIN#"
-find /out/photos -name '*.js' | xargs sed -i'' "s#https://albums.ente.io#\$ENTE_ALBUMS_ORIGIN#"
+COPY <<EOF /docker-entrypoint.d/90-replace-ente-env.sh
+find /out -name '*.js' |
+ xargs sed -i'' "s#ENTE_API_ORIGIN_PLACEHOLDER#\$ENTE_API_ORIGIN#g"
+find /out/photos -name '*.js' |
+ xargs sed -i'' "s#ENTE_ALBUMS_ORIGIN_PLACEHOLDER#\$ENTE_ALBUMS_ORIGIN#g"
EOF
-RUN chmod +x /docker-entrypoint.d/replace-ente-env.sh
+RUN chmod +x /docker-entrypoint.d/90-replace-ente-env.sh