From 3b67b7ce6d61a874f46a869a19c2d33d45a20e95 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 16 Mar 2026 21:52:13 +0100 Subject: [PATCH] Move app-specific config from packages/app into root app-config.yaml The example app (packages/app) had a separate app-config.yaml that was loaded via --config flags in the start script. This moves the NFS configuration (routes, pluginOverrides, extensions) into the root app-config.yaml and removes the --config flags so the app uses the default config resolution. Signed-off-by: Patrik Oldsberg Made-with: Cursor --- app-config.yaml | 124 ++++++++++++++++ packages/app/app-config.yaml | 269 ----------------------------------- packages/app/package.json | 2 +- 3 files changed, 125 insertions(+), 270 deletions(-) delete mode 100644 packages/app/app-config.yaml diff --git a/app-config.yaml b/app-config.yaml index e88955a39f..5eea93084e 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -27,6 +27,130 @@ app: packageName: example-app + routes: + bindings: + catalog.viewTechDoc: techdocs.docRoot + org.catalogIndex: catalog.catalogIndex + + pluginOverrides: + - match: + pluginId: pages + info: + description: 'This description was overridden in app-config.yaml' + - match: + pluginId: /^catalog(-.*)?$/ + info: + ownerEntityRefs: [cubic-belugas] + - match: + packageName: '@backstage/plugin-scaffolder' + info: + ownerEntityRefs: [cubic-belugas] + + extensions: + # set availableLanguages example + - api:app/app-language: + config: + availableLanguages: ['en', 'es', 'fr', 'de', 'ja'] + defaultLanguage: 'en' + - entity-card:org/members-list: + config: + showAggregateMembersToggle: true + initialRelationAggregation: aggregated + - entity-card:org/ownership: + config: + ownedKinds: ['Component', 'API', 'System'] + + # - apis.plugin.graphiql.browse.gitlab: true + # - graphiql-endpoint:graphiql/gitlab: true + + - nav-item:search: false + - nav-item:user-settings: false + - nav-item:catalog + - nav-item:api-docs + - nav-item:scaffolder + - nav-item:app-visualizer + + # Pages + - page:catalog/entity: + config: + showNavItemIcons: true + # default content order for all groups, can be 'title' or 'natural' + # defaultContentOrder: title + groups: + # placing a tab at the beginning + - overview: + title: Overview + # example disabling a default group + # - development: false + # example overriding a default group title + - documentation: + title: Docs + icon: docs + # example aliasing a group + # aliases: + # - docs + - deployment: + title: Deployments + # example adding a new group + - custom: + title: Custom + + # Entity page cards + - entity-card:catalog/about: + config: + type: info + - entity-card:catalog/labels + - entity-card:catalog/links: + config: + filter: + kind: component + metadata.links: + $exists: true + # filter: kind:component has:links + type: info + # - entity-card:linguist/languages + - entity-card:catalog-graph/relations: + config: + height: 300 + - entity-card:api-docs/has-apis + - entity-card:api-docs/consumed-apis + - entity-card:api-docs/provided-apis + - entity-card:api-docs/providing-components + - entity-card:api-docs/consuming-components + # Org Plugin + - entity-card:org/group-profile + - entity-card:org/members-list + - entity-card:org/ownership + - entity-card:org/user-profile: + config: + maxRelations: 5 + hideIcons: true + # - entity-card:azure-devops/readme + + # Entity page contents + - entity-content:catalog/overview + - entity-content:api-docs/definition + - entity-content:api-docs/apis: + config: + # example overriding the default group + group: documentation + icon: kind:api + - entity-content:techdocs: + config: + icon: techdocs + - entity-content:kubernetes/kubernetes: + config: + # example disassociating from the default group + group: false + # - entity-content:azure-devops/pipelines + # - entity-content:azure-devops/pull-requests + # - entity-content:azure-devops/git-tags + + # Enable the catalog-unprocessed-entities tab in devtools + - devtools-content:catalog-unprocessed-entities: true + # Disable the catalog-unprocessed-entities element outside devtools + - page:catalog-unprocessed-entities: false + backend: # Used for enabling authentication, secret is shared by all backend plugins # See https://backstage.io/docs/auth/service-to-service-auth for diff --git a/packages/app/app-config.yaml b/packages/app/app-config.yaml deleted file mode 100644 index 37893722f7..0000000000 --- a/packages/app/app-config.yaml +++ /dev/null @@ -1,269 +0,0 @@ -app: - packages: 'all' # ✨ - - routes: - bindings: - catalog.viewTechDoc: techdocs.docRoot - org.catalogIndex: catalog.catalogIndex - - pluginOverrides: - - match: - pluginId: pages - info: - description: 'This description was overridden in packages/app/app-config.yaml' - - match: - pluginId: /^catalog(-.*)?$/ - info: - ownerEntityRefs: [cubic-belugas] - - match: - packageName: '@backstage/plugin-scaffolder' - info: - ownerEntityRefs: [cubic-belugas] - - extensions: - # set availableLanguages example - - api:app/app-language: - config: - availableLanguages: ['en', 'es', 'fr', 'de', 'ja'] - defaultLanguage: 'en' - - entity-card:org/members-list: - config: - showAggregateMembersToggle: true - initialRelationAggregation: aggregated - - entity-card:org/ownership: - config: - ownedKinds: ['Component', 'API', 'System'] - - # - apis.plugin.graphiql.browse.gitlab: true - # - graphiql-endpoint:graphiql/gitlab: true - - - nav-item:search: false - - nav-item:user-settings: false - - nav-item:catalog - - nav-item:api-docs - - nav-item:scaffolder - - nav-item:app-visualizer - - # Pages - - page:catalog/entity: - config: - showNavItemIcons: true - # default content order for all groups, can be 'title' or 'natural' - # defaultContentOrder: title - groups: - # placing a tab at the beginning - - overview: - title: Overview - # example disabling a default group - # - development: false - # example overriding a default group title - - documentation: - title: Docs - icon: docs - # example aliasing a group - # aliases: - # - docs - - deployment: - title: Deployments - # example adding a new group - - custom: - title: Custom - - # Entity page cards - - entity-card:catalog/about: - config: - type: info - - entity-card:catalog/labels - - entity-card:catalog/links: - config: - filter: - kind: component - metadata.links: - $exists: true - # filter: kind:component has:links - type: info - # - entity-card:linguist/languages - - entity-card:catalog-graph/relations: - config: - height: 300 - - entity-card:api-docs/has-apis - - entity-card:api-docs/consumed-apis - - entity-card:api-docs/provided-apis - - entity-card:api-docs/providing-components - - entity-card:api-docs/consuming-components - # Org Plugin - - entity-card:org/group-profile - - entity-card:org/members-list - - entity-card:org/ownership - - entity-card:org/user-profile: - config: - maxRelations: 5 - hideIcons: true - # - entity-card:azure-devops/readme - - # Entity page contents - - entity-content:catalog/overview - - entity-content:api-docs/definition - - entity-content:api-docs/apis: - config: - # example overriding the default group - group: documentation - icon: kind:api - - entity-content:techdocs: - config: - icon: techdocs - - entity-content:kubernetes/kubernetes: - config: - # example disassociating from the default group - group: false - # - entity-content:azure-devops/pipelines - # - entity-content:azure-devops/pull-requests - # - entity-content:azure-devops/git-tags - - # Enable the catalog-unprocessed-entities tab in devtools - - devtools-content:catalog-unprocessed-entities: true - # Disable the catalog-unprocessed-entities element outside devtools - - page:catalog-unprocessed-entities: false - - # scmAuthExtension: >- - # createScmAuthExtension({ - # id: 'apis.scmAuth.addons.ghe', - # factory({ bind }) { - # bind.scmAuthAddon({ - # baseUrl: 'https://github.spotify.net', - # api: githubAuthApiRef, - # }) - # } - # }) - - # externalRouteRefs: - # bind(catalogPlugin.externalRoutes, { - # createComponent: scaffolderPlugin.routes.root, - # viewTechDoc: techdocsPlugin.routes.docRoot, - # createFromTemplate: scaffolderPlugin.routes.selectedTemplate, - # }); - # bind(apiDocsPlugin.externalRoutes, { - # registerApi: catalogImportPlugin.routes.importPage, - # }); - # bind(scaffolderPlugin.externalRoutes, { - # registerComponent: catalogImportPlugin.routes.importPage, - # viewTechDoc: techdocsPlugin.routes.docRoot, - # }); - # bind(orgPlugin.externalRoutes, { - # catalogIndex: catalogPlugin.routes.catalogIndex, - # }); - - # extensions: - # - plugin.catalog: - # config: - # externalRoutes: - # createComponent: plugin.scaffolder.page - # viewTechDoc: plugin.techdocs.docRootPage - # createFromTemplate: plugin.scaffolder.templatePage - # - graphiql.page: - # config: - # path: / - # - apis.auth.providers.github: - # config: - # provider: ghe - - # - core.signInPage: - # props: - # provider: - # id: google - # title: Google - # message: Sign In using Google - # apiRef: googleAuthApiRef # ??? - - # - core.nav: - # config: - # logo: assets/logo.png - # layout: - # - label: Search - # icon: search - # to: /search - # items: - # - point: search - # - type: divider - # - label: Menu - # icon: menu - # items: - # - label: Home - # icon: home - # to: /catalog - # - label: Create... - # icon: create - # to: /create - # - type: divider - # - type: scroll-wrapper - # items: - # - label: Tech Radar - # icon: map - # to: /tech-radar - # - label: GraphiQL - # icon: graphiql - # to: /graphiql - # - type: divider - # - point: shortcuts - # - type: space - # - type: divider - # - label: Settings - # icon: avatar - # to: /settings - # items: - # - point: settings - # - core.nav/search: '@backstage/plugin-search#SidebarSearchModal' - # - core.nav/shortcuts: - # use: '@backstage/plugin-shortcuts#Shortcuts' - # config: - # allowExternalLinks: true - # - core.nav/settings: '@backstage/plugin-user-settings#SidebarSettings' - - # - core.pages.index: - # at: - # point: core.routes - # config: - # path: / - # use: 'react-router-dom#Navigate' - # config: - # to: /catalog - - # - scaffolder.page: - # config: - # groups: - # - title: Recommended - # filter: - # entity.metadata.tags: recommended - # - scaffolder.page/fields: '@backstage/plugin-scaffolder#LowerCaseValuePickerFieldExtension' - # - scaffolder.page/layout: '@backstage/plugin-scaffolder#TwoColumnLayout' - - # - search.page/content: 'app#customSearchPage' # custom search page from somewhere - - # - user-settings.page.routes.advanced: - # at: - # point: user-settings.page/routes - # config: - # title: Advanced - # path: /advanced - # use: '@backstage/plugin-user-settings#AdvancedSettings' - - # - entity.card.orphanWarning - # - entity.card.processingErrors - # - entity.card.about - # - entity.card.catalogGraph - # - entity.card.pagerDuty - # - entity.card.links - # - entity.card.labels - # - entity.card.githubInsightsLanguages - # - entity.card.githubInsightsReleases - # - entity.card.githubInsightsReadme: - # config: - # maxHeight: 350 # Throwing this config in to have an example, but in practice rely on default - # - entity.card.subcomponentsCard - # - entity.card.userProfile - # - entity.card.ownership - # - entity.card.likeDislikeRatings - # - entity.content.dependsOnComponents - # - entity.content.codeInsights - # - entity.content.todo - # - entity.content.feedbackResponse diff --git a/packages/app/package.json b/packages/app/package.json index add1814f64..22d7436dc6 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -19,7 +19,7 @@ "build": "backstage-cli package build", "clean": "backstage-cli package clean", "lint": "backstage-cli package lint", - "start": "backstage-cli package start --config ../../app-config.yaml --config app-config.yaml", + "start": "backstage-cli package start", "test": "backstage-cli package test" }, "browserslist": {