[PR #428] [MERGED] Remove VITE_SERVER_ENDPOINT dependency #8611

Closed
opened 2026-02-05 13:50:14 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/428
Author: @alextran1502
Created: 8/5/2022
Status: Merged
Merged: 8/7/2022
Merged by: @alextran1502

Base: mainHead: experiment/remove-vite-server-endpoint


📝 Commits (6)

  • 8ff9f24 Move backend api to its own instance
  • 0ac9d72 Remove external fetch hook
  • 43c108a Added endpoint for album
  • bdc71da Added endpoint for admin page
  • aba7e53 Make request directly to immich-server
  • a39797d Refactor unsued code

📊 Changes

23 files changed (+152 additions, -66 deletions)

View changed files

📝 docker/.env.example (+0 -15)
📝 server/apps/immich/src/config/app.config.ts (+0 -1)
server/entrypoint.sh (+0 -1)
📝 web/src/api/api.ts (+7 -1)
📝 web/src/hooks.ts (+3 -3)
📝 web/src/lib/components/album-page/album-viewer.svelte (+1 -1)
📝 web/src/lib/components/shared-components/status-box.svelte (+0 -5)
📝 web/src/lib/stores/assets.ts (+4 -0)
📝 web/src/lib/utils/file-uploader.ts (+1 -1)
📝 web/src/routes/admin/index.svelte (+5 -3)
📝 web/src/routes/albums/[albumId]/index.svelte (+5 -3)
📝 web/src/routes/albums/[albumId]/photos/[assetId].svelte (+1 -3)
📝 web/src/routes/albums/index.svelte (+5 -3)
web/src/routes/data/README.md (+1 -0)
web/src/routes/data/album/get-album-info.ts (+18 -0)
web/src/routes/data/album/get-all-albums.ts (+18 -0)
web/src/routes/data/asset/get-all-assets.ts (+15 -0)
web/src/routes/data/user/get-all-users.ts (+17 -0)
web/src/routes/data/user/get-my-user-info.ts (+15 -0)
📝 web/src/routes/index.svelte (+17 -14)

...and 3 more files

📄 Description

This PR removes VITE_SERVER_ENDPOINT in the .env setting in an effort to further simplify the setup.

All of the requests that will be made from the SSR of SvelteKit are moved to routes/data (Info) because this is the only way to make sure those requests are made from the server side of the web container. All other client-side requests are left in the same condition as before.

The server-side requests now have the base URL of http://immich-server:3001 made within Docker's network.

This change shouldn't affect any users using the default docker-compose.yml Any other advanced users that opt out of using immich-proxy will need to make sure that any request with /api will need to be routed to the immich-server container.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/428 **Author:** [@alextran1502](https://github.com/alextran1502) **Created:** 8/5/2022 **Status:** ✅ Merged **Merged:** 8/7/2022 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `experiment/remove-vite-server-endpoint` --- ### 📝 Commits (6) - [`8ff9f24`](https://github.com/immich-app/immich/commit/8ff9f241550991e5e86cd6fc51d0bdf835197bd3) Move backend api to its own instance - [`0ac9d72`](https://github.com/immich-app/immich/commit/0ac9d72a94eba9954090b3e1b69ba27f0a398324) Remove external fetch hook - [`43c108a`](https://github.com/immich-app/immich/commit/43c108a4ac1483c77652a100d885ea7d23a501b6) Added endpoint for album - [`bdc71da`](https://github.com/immich-app/immich/commit/bdc71daa7956e75238ebe8b2d875da42e38704b9) Added endpoint for admin page - [`aba7e53`](https://github.com/immich-app/immich/commit/aba7e53691a97f0464f97c17cab93b58c7250bdc) Make request directly to immich-server - [`a39797d`](https://github.com/immich-app/immich/commit/a39797d42663bdd0b62c09de13de1afd6ffbb839) Refactor unsued code ### 📊 Changes **23 files changed** (+152 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `docker/.env.example` (+0 -15) 📝 `server/apps/immich/src/config/app.config.ts` (+0 -1) ➖ `server/entrypoint.sh` (+0 -1) 📝 `web/src/api/api.ts` (+7 -1) 📝 `web/src/hooks.ts` (+3 -3) 📝 `web/src/lib/components/album-page/album-viewer.svelte` (+1 -1) 📝 `web/src/lib/components/shared-components/status-box.svelte` (+0 -5) 📝 `web/src/lib/stores/assets.ts` (+4 -0) 📝 `web/src/lib/utils/file-uploader.ts` (+1 -1) 📝 `web/src/routes/admin/index.svelte` (+5 -3) 📝 `web/src/routes/albums/[albumId]/index.svelte` (+5 -3) 📝 `web/src/routes/albums/[albumId]/photos/[assetId].svelte` (+1 -3) 📝 `web/src/routes/albums/index.svelte` (+5 -3) ➕ `web/src/routes/data/README.md` (+1 -0) ➕ `web/src/routes/data/album/get-album-info.ts` (+18 -0) ➕ `web/src/routes/data/album/get-all-albums.ts` (+18 -0) ➕ `web/src/routes/data/asset/get-all-assets.ts` (+15 -0) ➕ `web/src/routes/data/user/get-all-users.ts` (+17 -0) ➕ `web/src/routes/data/user/get-my-user-info.ts` (+15 -0) 📝 `web/src/routes/index.svelte` (+17 -14) _...and 3 more files_ </details> ### 📄 Description This PR removes `VITE_SERVER_ENDPOINT` in the `.env` setting in an effort to further simplify the setup. All of the requests that will be made from the SSR of SvelteKit are moved to `routes/data` ([Info](https://kit.svelte.dev/docs/routing)) because this is the only way to make sure those requests are made from the server side of the web container. All other client-side requests are left in the same condition as before. The server-side requests now have the base URL of `http://immich-server:3001` made within Docker's network. This change shouldn't affect any users using the default `docker-compose.yml` Any other advanced users that opt out of using `immich-proxy` will need to make sure that any request with `/api` will need to be routed to the `immich-server` container. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 13:50:14 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#8611