[PR #520] [MERGED] refactor!: serve the static frontend trough the backend #750

Closed
opened 2025-10-07 00:21:43 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/520
Author: @stonith404
Created: 5/9/2025
Status: Merged
Merged: 5/17/2025
Merged by: @stonith404

Base: v1.0.0Head: feat/proxy-frontend


📝 Commits (10+)

  • 9123d48 proxy frontend trough backend
  • 7712533 adapt Dockerfile
  • 9e5bd9c use old volume path for backwards compability
  • 830879d adapt environment vairables
  • 33da15f remove caddy references
  • 8623282 use port 80 as default port for backwards compability
  • f1626f3 remove unnecessary route check
  • 70a25c8 simplify error check if frontend not included
  • 4eb12b5 Merge branch 'main' into feat/proxy-frontend
  • e58ee79 ignore typecheck on frontendFS

📊 Changes

74 files changed (+771 additions, -817 deletions)

View changed files

📝 .devcontainer/devcontainer.json (+1 -2)
📝 .dockerignore (+5 -1)
📝 .env.example (+1 -1)
📝 .github/workflows/backend-linter.yml (+1 -0)
.github/workflows/build-and-push-docker-image.yml (+0 -50)
📝 .github/workflows/e2e-tests.yml (+4 -4)
.github/workflows/release.yml (+84 -0)
📝 .github/workflows/svelte-check.yml (+1 -1)
📝 .github/workflows/unit-tests.yml (+1 -1)
📝 .github/workflows/update-aaguids.yml (+1 -0)
📝 .gitignore (+2 -0)
.vscode/tasks.json (+0 -37)
📝 CONTRIBUTING.md (+7 -14)
📝 Dockerfile (+24 -29)
📝 backend/.env.example (+7 -10)
backend/frontend/frontend_excluded.go (+9 -0)
backend/frontend/frontend_included.go (+77 -0)
backend/frontend/shared.go (+5 -0)
📝 backend/internal/bootstrap/router_bootstrap.go (+14 -0)
📝 backend/internal/common/env_config.go (+9 -7)

...and 54 more files

📄 Description

Fixes: https://github.com/pocket-id/pocket-id/issues/536

TODO

Breaking changes

The following breaking changes should be documented in version 1.0.0:

  • Port in the "ports" section and in the health check in the docker-compose.yml has to be changed to 1411.
  • PUBLIC_UI_CONFIG_DISABLED has been renamed to UI_CONFIG_DISABLED
  • CADDY_DISABLED has been removed. If you've disabled Caddy, you probably have path mappings to /.well-known and /api in your reverse proxy configuration. These mappings aren't necessary anymore, your reverse proxy should now solely point to Pocket ID on port 1411 (or the port set with the PORT variable).
  • CADDY_PORT has been removed and replaced by PORT
  • BACKEND_PORT has been removed and replaced by PORT
  • The behavior of PORT has been changed. This variable now doesn't change the port of the frontend anymore, but for the whole application.

🔄 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/pocket-id/pocket-id/pull/520 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 5/9/2025 **Status:** ✅ Merged **Merged:** 5/17/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `v1.0.0` ← **Head:** `feat/proxy-frontend` --- ### 📝 Commits (10+) - [`9123d48`](https://github.com/pocket-id/pocket-id/commit/9123d48303d4f2afff294e792ea14f5d5a5cc935) proxy frontend trough backend - [`7712533`](https://github.com/pocket-id/pocket-id/commit/7712533515768ccd1d5ee45dc8b0a22391468609) adapt Dockerfile - [`9e5bd9c`](https://github.com/pocket-id/pocket-id/commit/9e5bd9caf718427eb6646b4d70322be393546af4) use old volume path for backwards compability - [`830879d`](https://github.com/pocket-id/pocket-id/commit/830879df3aaf3d02ca63ee9b4ac93faefb673f35) adapt environment vairables - [`33da15f`](https://github.com/pocket-id/pocket-id/commit/33da15fb40effd09623a5d261699b059568ac8b3) remove caddy references - [`8623282`](https://github.com/pocket-id/pocket-id/commit/862328209923302851d9761c480b19fd029bb3ea) use port 80 as default port for backwards compability - [`f1626f3`](https://github.com/pocket-id/pocket-id/commit/f1626f3a084d2066c4e534b03c052f2126301a52) remove unnecessary route check - [`70a25c8`](https://github.com/pocket-id/pocket-id/commit/70a25c8c7785058434a1e23851312bc6dd0bf116) simplify error check if frontend not included - [`4eb12b5`](https://github.com/pocket-id/pocket-id/commit/4eb12b5fe80205d33037d72c7c11c52705ae8c0b) Merge branch 'main' into feat/proxy-frontend - [`e58ee79`](https://github.com/pocket-id/pocket-id/commit/e58ee7935a641d5ceba4842097a43f14f137e442) ignore typecheck on frontendFS ### 📊 Changes **74 files changed** (+771 additions, -817 deletions) <details> <summary>View changed files</summary> 📝 `.devcontainer/devcontainer.json` (+1 -2) 📝 `.dockerignore` (+5 -1) 📝 `.env.example` (+1 -1) 📝 `.github/workflows/backend-linter.yml` (+1 -0) ➖ `.github/workflows/build-and-push-docker-image.yml` (+0 -50) 📝 `.github/workflows/e2e-tests.yml` (+4 -4) ➕ `.github/workflows/release.yml` (+84 -0) 📝 `.github/workflows/svelte-check.yml` (+1 -1) 📝 `.github/workflows/unit-tests.yml` (+1 -1) 📝 `.github/workflows/update-aaguids.yml` (+1 -0) 📝 `.gitignore` (+2 -0) ➖ `.vscode/tasks.json` (+0 -37) 📝 `CONTRIBUTING.md` (+7 -14) 📝 `Dockerfile` (+24 -29) 📝 `backend/.env.example` (+7 -10) ➕ `backend/frontend/frontend_excluded.go` (+9 -0) ➕ `backend/frontend/frontend_included.go` (+77 -0) ➕ `backend/frontend/shared.go` (+5 -0) 📝 `backend/internal/bootstrap/router_bootstrap.go` (+14 -0) 📝 `backend/internal/common/env_config.go` (+9 -7) _...and 54 more files_ </details> ### 📄 Description Fixes: https://github.com/pocket-id/pocket-id/issues/536 ## TODO - [x] [Cache static assets](https://github.com/pocket-id/pocket-id/pull/520#discussion_r2081971318) - [x] Setup GitHub action to build binaries and attach them to new releases ## Breaking changes The following breaking changes should be documented in version `1.0.0`: - Port in the "ports" section and in the health check in the `docker-compose.yml` has to be changed to `1411`. - `PUBLIC_UI_CONFIG_DISABLED` has been renamed to `UI_CONFIG_DISABLED` - `CADDY_DISABLED` has been removed. If you've disabled Caddy, you probably have path mappings to `/.well-known` and `/api` in your reverse proxy configuration. These mappings aren't necessary anymore, your reverse proxy should now solely point to Pocket ID on port `1411` (or the port set with the `PORT` variable). - `CADDY_PORT` has been removed and replaced by `PORT` - `BACKEND_PORT` has been removed and replaced by `PORT` - The behavior of `PORT` has been changed. This variable now doesn't change the port of the frontend anymore, but for the whole application. --- <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 2025-10-07 00:21:43 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#750