Skip to content

Commit 877bb12

Browse files
committed
Initial commit
0 parents  commit 877bb12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1813
-0
lines changed

.dockerignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.git
2+
.yarn/cache
3+
.yarn/install-state.gz
4+
node_modules
5+
packages/*/src
6+
packages/*/node_modules
7+
plugins
8+
*.local.yaml

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
playwright.config.ts

.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
root: true,
3+
};

.gitignore

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Coverage directory generated when running tests with coverage
13+
coverage
14+
15+
# Dependencies
16+
node_modules/
17+
18+
# Yarn 3 files
19+
.pnp.*
20+
.yarn/*
21+
!.yarn/patches
22+
!.yarn/plugins
23+
!.yarn/releases
24+
!.yarn/sdks
25+
!.yarn/versions
26+
27+
# Node version directives
28+
.nvmrc
29+
30+
# dotenv environment variables file
31+
.env
32+
.env.test
33+
34+
# Build output
35+
dist
36+
dist-types
37+
38+
# Temporary change files created by Vim
39+
*.swp
40+
41+
# MkDocs build output
42+
site
43+
44+
# Local configuration files
45+
*.local.yaml
46+
47+
# Sensitive credentials
48+
*-credentials.yaml
49+
50+
# vscode database functionality support files
51+
*.session.sql
52+
53+
# E2E test reports
54+
e2e-test-report/

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
dist-types
3+
coverage
4+
.vscode

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# [Backstage](https://backstage.io)
2+
3+
This is your newly scaffolded Backstage App, Good Luck!
4+
5+
To start the app, run:
6+
7+
```sh
8+
yarn install
9+
yarn dev
10+
```

app-config.production.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
app:
2+
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
3+
baseUrl: http://localhost:7007
4+
5+
backend:
6+
# Note that the baseUrl should be the URL that the browser and other clients
7+
# should use when communicating with the backend, i.e. it needs to be
8+
# reachable not just from within the backend host, but from all of your
9+
# callers. When its value is "http://localhost:7007", it's strictly private
10+
# and can't be reached by others.
11+
baseUrl: http://localhost:7007
12+
# The listener can also be expressed as a single <host>:<port> string. In this case we bind to
13+
# all interfaces, the most permissive setting. The right value depends on your specific deployment.
14+
listen: ':7007'
15+
16+
# config options: https://node-postgres.com/api/client
17+
database:
18+
client: pg
19+
connection:
20+
host: ${POSTGRES_HOST}
21+
port: ${POSTGRES_PORT}
22+
user: ${POSTGRES_USER}
23+
password: ${POSTGRES_PASSWORD}
24+
# https://node-postgres.com/features/ssl
25+
# you can set the sslmode configuration option via the `PGSSLMODE` environment variable
26+
# see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
27+
# ssl:
28+
# ca: # if you have a CA file and want to verify it you can uncomment this section
29+
# $file: <file-path>/ca/server.crt
30+
31+
auth:
32+
providers:
33+
guest: null
34+
35+
catalog:
36+
# Overrides the default list locations from app-config.yaml as these contain example data.
37+
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details
38+
# on how to get entities into the catalog.
39+
locations: []

app-config.yaml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
app:
2+
title: Scaffolded Backstage App
3+
baseUrl: http://localhost:3000
4+
5+
organization:
6+
name: My Company
7+
8+
backend:
9+
# Used for enabling authentication, secret is shared by all backend plugins
10+
# See https://backstage.io/docs/auth/service-to-service-auth for
11+
# information on the format
12+
# auth:
13+
# keys:
14+
# - secret: ${BACKEND_SECRET}
15+
baseUrl: http://localhost:7007
16+
listen:
17+
port: 7007
18+
# Uncomment the following host directive to bind to specific interfaces
19+
# host: 127.0.0.1
20+
csp:
21+
connect-src: ["'self'", 'http:', 'https:']
22+
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
23+
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
24+
cors:
25+
origin: http://localhost:3000
26+
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
27+
credentials: true
28+
# This is for local development only, it is not recommended to use this in production
29+
# The production database configuration is stored in app-config.production.yaml
30+
database:
31+
client: better-sqlite3
32+
connection: ':memory:'
33+
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
34+
35+
integrations:
36+
github:
37+
- host: github.com
38+
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
39+
# about setting up the GitHub integration here: https://backstage.io/docs/integrations/github/locations#configuration
40+
token: ${GITHUB_TOKEN}
41+
### Example for how to add your GitHub Enterprise instance using the API:
42+
# - host: ghe.example.net
43+
# apiBaseUrl: https://ghe.example.net/api/v3
44+
# token: ${GHE_TOKEN}
45+
46+
proxy:
47+
### Example for how to add a proxy endpoint for the frontend.
48+
### A typical reason to do this is to handle HTTPS and CORS for internal services.
49+
# endpoints:
50+
# '/test':
51+
# target: 'https://example.com'
52+
# changeOrigin: true
53+
54+
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
55+
# Note: After experimenting with basic setup, use CI/CD to generate docs
56+
# and an external cloud storage when deploying TechDocs for production use-case.
57+
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
58+
techdocs:
59+
builder: 'local' # Alternatives - 'external'
60+
generator:
61+
runIn: 'docker' # Alternatives - 'local'
62+
publisher:
63+
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
64+
65+
auth:
66+
# see https://backstage.io/docs/auth/ to learn about auth providers
67+
providers:
68+
# See https://backstage.io/docs/auth/guest/provider
69+
guest: {}
70+
71+
scaffolder:
72+
# see https://backstage.io/docs/features/software-templates/configuration for software template options
73+
74+
catalog:
75+
import:
76+
entityFilename: catalog-info.yaml
77+
pullRequestBranchName: backstage-integration
78+
rules:
79+
- allow: [Component, System, API, Resource, Location]
80+
locations:
81+
# Local example data, file locations are relative to the backend process, typically `packages/backend`
82+
- type: file
83+
target: ../../examples/entities.yaml
84+
85+
# Local example template
86+
- type: file
87+
target: ../../examples/template/template.yaml
88+
rules:
89+
- allow: [Template]
90+
91+
# Local example organizational data
92+
- type: file
93+
target: ../../examples/org.yaml
94+
rules:
95+
- allow: [User, Group]
96+
97+
## Uncomment these lines to add more example data
98+
# - type: url
99+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
100+
101+
## Uncomment these lines to add an example org
102+
# - type: url
103+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
104+
# rules:
105+
# - allow: [User, Group]

backstage.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "1.26.0"
3+
}

catalog-info.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: backstage.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: test-dependency-embedding
5+
description: An example of a Backstage application.
6+
# Example for optional annotations
7+
# annotations:
8+
# github.com/project-slug: backstage/backstage
9+
# backstage.io/techdocs-ref: dir:.
10+
spec:
11+
type: website
12+
13+
lifecycle: experimental

examples/entities.yaml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system
3+
apiVersion: backstage.io/v1alpha1
4+
kind: System
5+
metadata:
6+
name: examples
7+
spec:
8+
owner: guests
9+
---
10+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
11+
apiVersion: backstage.io/v1alpha1
12+
kind: Component
13+
metadata:
14+
name: example-website
15+
spec:
16+
type: website
17+
lifecycle: experimental
18+
owner: guests
19+
system: examples
20+
providesApis: [example-grpc-api]
21+
---
22+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api
23+
apiVersion: backstage.io/v1alpha1
24+
kind: API
25+
metadata:
26+
name: example-grpc-api
27+
spec:
28+
type: grpc
29+
lifecycle: experimental
30+
owner: guests
31+
system: examples
32+
definition: |
33+
syntax = "proto3";
34+
35+
service Exampler {
36+
rpc Example (ExampleMessage) returns (ExampleMessage) {};
37+
}
38+
39+
message ExampleMessage {
40+
string example = 1;
41+
};

examples/org.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user
3+
apiVersion: backstage.io/v1alpha1
4+
kind: User
5+
metadata:
6+
name: guest
7+
spec:
8+
memberOf: [guests]
9+
---
10+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group
11+
apiVersion: backstage.io/v1alpha1
12+
kind: Group
13+
metadata:
14+
name: guests
15+
spec:
16+
type: team
17+
children: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: backstage.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: ${{ values.name | dump }}
5+
spec:
6+
type: service
7+
owner: user:guest
8+
lifecycle: experimental

examples/template/content/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Hello from ${{ values.name }}!');
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "${{ values.name }}",
3+
"private": true,
4+
"dependencies": {}
5+
}

0 commit comments

Comments
 (0)