From 05d5d908cf24c6d54a37b7a58053ea8ebc60b021 Mon Sep 17 00:00:00 2001 From: Rephl3x Date: Fri, 30 Jan 2026 22:07:03 +1300 Subject: [PATCH] Build 3001262204: add gravitee stack --- .gitignore | 2 + README.md | 12 ++++ backend/app/build_info.py | 4 +- docker-compose.gravitee.yml | 111 ++++++++++++++++++++++++++++++++++++ frontend/package.json | 2 +- gravitee/README.md | 32 +++++++++++ 6 files changed, 160 insertions(+), 3 deletions(-) create mode 100644 docker-compose.gravitee.yml create mode 100644 gravitee/README.md diff --git a/.gitignore b/.gitignore index 916a6bb..423ed61 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ backend/.pytest_cache/ frontend/node_modules/ frontend/.next/ *.log +gravitee/** +!gravitee/README.md diff --git a/README.md b/README.md index d1e4aa5..530dcd7 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,18 @@ Then open: 3) Log in at http://localhost:3000. 4) Visit Settings to confirm service health. +### Gravitee APIM (optional) + +If you want API management in front of Magent, you can run the Gravitee stack alongside +the main container: + +```bash +docker compose -f docker-compose.yml -f docker-compose.gravitee.yml up -d +``` + +Then open the Management UI at http://localhost:8084 and create a new API that points to +`http://magent:8000`. The Gravitee gateway will be available at http://localhost:8082. + ### Docker environment variables (sample) ```bash diff --git a/backend/app/build_info.py b/backend/app/build_info.py index cbd26fa..ff6dfb7 100644 --- a/backend/app/build_info.py +++ b/backend/app/build_info.py @@ -1,2 +1,2 @@ -BUILD_NUMBER = "3001262148" -CHANGELOG = '2026-01-22\\n- Initial commit\\n- Ignore build artifacts\\n- Update README\\n- Update README with Docker-first guide\\n\\n2026-01-23\\n- Fix cache titles via Jellyseerr media lookup\\n- Split search actions and improve download options\\n- Fallback manual grab to qBittorrent\\n- Hide header actions when signed out\\n- Add feedback form and webhook\\n- Fix cache titles and move feedback link\\n- Show available status on landing when in Jellyfin\\n- Add default branding assets when missing\\n- Use bundled branding assets\\n- Remove password fields from users page\\n- Add Docker Hub compose override\\n- Fix backend Dockerfile paths for root context\\n- Copy public assets into frontend image\\n- Use backend branding assets for logo and favicon\\n\\n2026-01-24\\n- Route grabs through Sonarr/Radarr only\\n- Document fix buttons in how-it-works\\n- Clarify how-it-works steps and fixes\\n- Map Prowlarr releases to Arr indexers for manual grab\\n- Improve request handling and qBittorrent categories\\n\\n2026-01-25\\n- Add site banner, build number, and changelog\\n- Automate build number tagging and sync\\n- Improve mobile header layout\\n- Move account actions into avatar menu\\n- Add user stats and activity tracking\\n- Add Jellyfin login cache and admin-only stats\\n- Tidy request sync controls\\n- Seed branding logo from bundled assets\\n- Serve bundled branding assets by default\\n- Harden request cache titles and cache-only reads\\n- Build 2501262041\\n\\n2026-01-26\\n- Fix cache title hydration\\n- Fix sync progress bar animation\\n\\n2026-01-27\\n- Add cache control artwork stats\\n- Improve cache stats performance (build 271261145)\\n- Fix backend cache stats import (build 271261149)\\n- Clarify request sync settings (build 271261159)\\n- Bump build number to 271261202\\n- Fix request titles in snapshots (build 271261219)\\n- Fix snapshot title fallback (build 271261228)\\n- Add cache load spinner (build 271261238)\\n- Bump build number (process 2) 271261322\\n- Add service test buttons (build 271261335)\\n- Fallback to TMDB when artwork cache fails (build 271261524)\\n- Hydrate missing artwork from Jellyseerr (build 271261539)\\n\\n2026-01-29\\n- release: 2901262036\\n- release: 2901262044\\n- release: 2901262102\\n- Hardcode build number in backend\\n- Bake build number and changelog\\n- Update full changelog\\n- Tidy full changelog\\n- Build 2901262240: cache users\n\n2026-01-30\n- Merge backend and frontend into one container' +BUILD_NUMBER = "3001262204" +CHANGELOG = '2026-01-22\\n- Initial commit\\n- Ignore build artifacts\\n- Update README\\n- Update README with Docker-first guide\\n\\n2026-01-23\\n- Fix cache titles via Jellyseerr media lookup\\n- Split search actions and improve download options\\n- Fallback manual grab to qBittorrent\\n- Hide header actions when signed out\\n- Add feedback form and webhook\\n- Fix cache titles and move feedback link\\n- Show available status on landing when in Jellyfin\\n- Add default branding assets when missing\\n- Use bundled branding assets\\n- Remove password fields from users page\\n- Add Docker Hub compose override\\n- Fix backend Dockerfile paths for root context\\n- Copy public assets into frontend image\\n- Use backend branding assets for logo and favicon\\n\\n2026-01-24\\n- Route grabs through Sonarr/Radarr only\\n- Document fix buttons in how-it-works\\n- Clarify how-it-works steps and fixes\\n- Map Prowlarr releases to Arr indexers for manual grab\\n- Improve request handling and qBittorrent categories\\n\\n2026-01-25\\n- Add site banner, build number, and changelog\\n- Automate build number tagging and sync\\n- Improve mobile header layout\\n- Move account actions into avatar menu\\n- Add user stats and activity tracking\\n- Add Jellyfin login cache and admin-only stats\\n- Tidy request sync controls\\n- Seed branding logo from bundled assets\\n- Serve bundled branding assets by default\\n- Harden request cache titles and cache-only reads\\n- Build 2501262041\\n\\n2026-01-26\\n- Fix cache title hydration\\n- Fix sync progress bar animation\\n\\n2026-01-27\\n- Add cache control artwork stats\\n- Improve cache stats performance (build 271261145)\\n- Fix backend cache stats import (build 271261149)\\n- Clarify request sync settings (build 271261159)\\n- Bump build number to 271261202\\n- Fix request titles in snapshots (build 271261219)\\n- Fix snapshot title fallback (build 271261228)\\n- Add cache load spinner (build 271261238)\\n- Bump build number (process 2) 271261322\\n- Add service test buttons (build 271261335)\\n- Fallback to TMDB when artwork cache fails (build 271261524)\\n- Hydrate missing artwork from Jellyseerr (build 271261539)\\n\\n2026-01-29\\n- release: 2901262036\\n- release: 2901262044\\n- release: 2901262102\\n- Hardcode build number in backend\\n- Bake build number and changelog\\n- Update full changelog\\n- Tidy full changelog\\n- Build 2901262240: cache users\n\n2026-01-30\n- Merge backend and frontend into one container\n- Add optional Gravitee APIM stack for API management' diff --git a/docker-compose.gravitee.yml b/docker-compose.gravitee.yml new file mode 100644 index 0000000..93b5c64 --- /dev/null +++ b/docker-compose.gravitee.yml @@ -0,0 +1,111 @@ +services: + mongodb: + image: mongo:7.0 + container_name: magent-gravitee-mongodb + restart: always + volumes: + - ./gravitee/mongodb/data:/data/db + networks: + - gravitee_storage + + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:8.16.1 + container_name: magent-gravitee-elasticsearch + restart: always + volumes: + - ./gravitee/elasticsearch/data:/var/lib/elasticsearch/data + environment: + - http.host=0.0.0.0 + - transport.host=0.0.0.0 + - xpack.security.enabled=false + - cluster.name=gravitee + - bootstrap.memory_lock=true + - discovery.type=single-node + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: 65536 + networks: + - gravitee_storage + + gravitee_gateway: + image: graviteeio/apim-gateway:latest + container_name: magent-gravitee-gateway + restart: always + ports: + - "8082:8082" + depends_on: + - mongodb + - elasticsearch + volumes: + - ./gravitee/apim-gateway/logs:/opt/graviteeio-gateway/logs + - ./gravitee/apim-gateway/plugins:/opt/graviteeio-gateway/plugins-ext + environment: + - gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000 + - gravitee_ratelimit_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000 + - gravitee_reporters_elasticsearch_endpoints_0=http://elasticsearch:9200 + - gravitee_plugins_path_0=/opt/graviteeio-gateway/plugins + - gravitee_plugins_path_1=/opt/graviteeio-gateway/plugins-ext + networks: + - gravitee_storage + - gravitee_frontend + - default + + gravitee_management_api: + image: graviteeio/apim-management-api:latest + container_name: magent-gravitee-mgmtapi + restart: always + ports: + - "8083:8083" + - "8072:8072" + depends_on: + - mongodb + - elasticsearch + volumes: + - ./gravitee/apim-management-api/plugins:/opt/graviteeio-management-api/plugins-ext + environment: + - gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000 + - gravitee_analytics_elasticsearch_endpoints_0=http://elasticsearch:9200 + - gravitee_installation_standalone_portal_url=http://localhost:8085 + - gravitee_plugins_path_0=/opt/graviteeio-management-api/plugins + - gravitee_plugins_path_1=/opt/graviteeio-management-api/plugins-ext + - gravitee_integration_enabled=true + networks: + - gravitee_storage + - gravitee_frontend + + gravitee_management_ui: + image: graviteeio/apim-management-ui:latest + container_name: magent-gravitee-mgmtui + restart: always + ports: + - "8084:8080" + depends_on: + - gravitee_management_api + volumes: + - ./gravitee/apim-management-ui/logs:/var/log/nginx + environment: + - MGMT_API_URL=http://localhost:8083/management/organizations/DEFAULT/environments/DEFAULT/ + networks: + - gravitee_frontend + + gravitee_portal_ui: + image: graviteeio/apim-portal-ui:latest + container_name: magent-gravitee-portal + restart: always + ports: + - "8085:8080" + depends_on: + - gravitee_management_api + volumes: + - ./gravitee/apim-portal-ui/logs:/var/log/nginx + environment: + - PORTAL_API_URL=http://localhost:8083/portal/environments/DEFAULT + networks: + - gravitee_frontend + +networks: + gravitee_frontend: + gravitee_storage: diff --git a/frontend/package.json b/frontend/package.json index 07d4594..05dfb48 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "magent-frontend", "private": true, - "version": "3001262148", + "version": "3001262204", "scripts": { "dev": "next dev", "build": "next build", diff --git a/gravitee/README.md b/gravitee/README.md new file mode 100644 index 0000000..cb31c15 --- /dev/null +++ b/gravitee/README.md @@ -0,0 +1,32 @@ +# Gravitee APIM (optional) + +This folder is used by the optional Gravitee APIM stack defined in `docker-compose.gravitee.yml`. +The services will create their own data directories under `gravitee/` when started. + +## Start Gravitee with Magent + +Run Magent and Gravitee together: + +```bash +docker compose -f docker-compose.yml -f docker-compose.gravitee.yml up -d +``` + +Gravitee services: + +- Gateway: http://localhost:8082 +- Management API: http://localhost:8083 +- Management UI: http://localhost:8084 +- Developer portal: http://localhost:8085 + +Default credentials for the Management UI are typically `admin / admin` on first boot. +Change the password on first login. + +## Create a Magent API in Gravitee + +1) Open the Management UI at http://localhost:8084. +2) Create a new API (v4 or v2). +3) Set the backend endpoint to `http://magent:8000`. +4) Add a path mapping for `/api` if you want the gateway to front the Magent API. +5) Deploy the API. + +Once deployed, route requests through `http://localhost:8082`.