sreez-backstage-demo/sreez-showcase/app-config.yaml
2024-05-27 14:24:10 -04:00

139 lines
5.2 KiB
YAML

app:
title: Sreez Portal
baseUrl: http://localhost:3000
organization:
name: Sreez
backend:
baseUrl: http://localhost:7007
listen:
port: 7007
# Uncomment the following host directive to bind to specific interfaces
# host: 127.0.0.1
csp:
connect-src: [ "'self'", "http:", "https:" ]
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
cors:
origin: http://localhost:3000
methods: [ GET, HEAD, PATCH, POST, PUT, DELETE ]
credentials: true
# This is for local development only, it is not recommended to use this in production
# The production database configuration is stored in app-config.production.yaml
database:
client: better-sqlite3
connection: ":memory:"
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
proxy:
"/github/api":
target: https://api.github.com/repos
allowedHeaders: [ "Authorization", "X-GitHub-Api-Version" ]
headers:
Accept: application/vnd.github+json
X-GitHub-Api-Version: "2022-11-28"
"/argocd/api":
target: https://argocd-server-sreez.apps.oc-med.wk.nt.local/api/v1
changeOrigin: true
secure: false
headers:
Cookie:
# Set this variable by using this command
# export ARGOCD_AUTH_TOKEN="argocd.token=$(argocd --server argocd-server-sreez.apps.oc-med.wk.nt.local:443 --insecure account generate-token --account backstage)"
# Use the appropriate account as configured in your argo-cm deployment ConfigMap
$env: BACKSTAGE_ARGOCD_AUTH_TOKEN
### Example for how to add a proxy endpoint for the frontend.
### A typical reason to do this is to handle HTTPS and CORS for internal services.
# endpoints:
# '/test':
# target: 'https://example.com'
# changeOrigin: true
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
# Note: After experimenting with basic setup, use CI/CD to generate docs
# and an external cloud storage when deploying TechDocs for production use-case.
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
techdocs:
builder: "local" # Alternatives - 'external'
generator:
runIn: "docker" # Alternatives - 'local'
publisher:
type: "local" # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
auth:
environment: development
# allowGuestAccess: true
# see https://backstage.io/docs/auth/ to learn about auth providers
providers:
# See https://backstage.io/docs/auth/guest/provider
guest: { }
github:
development:
clientId: Iv1.62e73edda444f42c
clientSecret: 3f723fe4e40239d3817cb0a6a1190b7a71e86395
signIn:
resolvers:
- resolver: usernameMatchingUserEntityName
# - resolver: emailMatchingUserEntityProfileEmail
# - resolver: emailLocalPartMatchingUserEntityName
integrations:
github:
- host: github.com
apps:
- $include: github-app-backstage-sreez-credentials.yaml
events:
modules:
github:
webhookSecret: 707dd0e621c9fa7c00acd060e406d9f3a07fbe88
catalog:
providers:
github:
kheops:
organization: "kheops-org"
schedule: # same options as in TaskScheduleDefinition
frequency: { minutes: 30 }
timeout: { seconds: 30 }
githubOrg:
id: "kheops-org"
orgs: [ kheops-org ]
githubUrl: "https://github.com/"
schedule: # same options as in TaskScheduleDefinition
frequency: { minutes: 30 }
timeout: { seconds: 30 }
import:
entityFilename: catalog-info.yaml
pullRequestBranchName: backstage-integration
rules:
- allow: [ Component, System, API, Resource, Location, Users, Group ]
locations:
# Local example data, file locations are relative to the backend process, typically `packages/backend`
- type: file
target: ../../examples/entities.yaml
# Local example template
- type: file
target: ../../examples/template/template.yaml
rules:
- allow: [ Template ]
- type: url
target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
- type: url
target: https://github.com/backstage/backstage/raw/master/packages/catalog-model/examples/apis/petstore-api.yaml
- type: url
target: https://github.com/Kheops-org/backstage-templates/blob/main/templates.yaml
rules:
- allow: [ Template ]
- type: url
target: https://github.com/redhat-developer/red-hat-developer-hub-software-templates/blob/main/templates.yaml
rules:
- allow: [ Template ]
permission:
enabled: true
notifications:
# curl -X POST http://localhost:7007/api/notifications/notifications -H "Content-Type: application/json" -H "notifications-secret: your-secret-token-shared-with-external-services" -d '{"title":"my-title","origin":"my-origin","message":"message one","topic":"my-topic"}'
externalCallerSecret: notifications-secret
iframe:
allowList: [ "sreez.nationtech.io", "www.hyperdx.io", "http://localhost:8080" ]