Skip to content

Commit 3b31ac9

Browse files
authored
Merge pull request #54 from mozilla-services/MZCLD-182
MZCLD-182
2 parents 838aa6c + 4eddd7b commit 3b31ac9

File tree

15 files changed

+57
-395
lines changed

15 files changed

+57
-395
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
### Dependencies
66

7-
Install and run Postgres from docker:
7+
Run postgres & redis backends with docker-compose:
88

99
```sh
10-
docker run -e POSTGRES_PASSWORD=secret -p 5432:5432 postgres:15
10+
docker compose up
1111
```
1212

13+
> `docker-compose.yaml` defines volumes for postgres & redis to persist data for as long as the compose stack isn't destroyed.
14+
1315
Set environment variables for postgres (or use `.env` file):
1416

1517
```sh

app-config.production.yaml

Lines changed: 0 additions & 101 deletions
This file was deleted.

app-config.yaml

Lines changed: 19 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,43 @@
11
app:
2-
title: Moz Backstage App
2+
title: moz backstage app
33
baseUrl: http://localhost:3000
44
analytics:
5-
glean:
5+
glean:
66
appId: moz_backstage
7-
enabled: true
8-
debug:
7+
debug:
98
logging: false
109
tag: backstage-dev
10+
11+
enabled: true
1112
environment: development
1213

1314
organization:
14-
name: Mozilla
15+
name: mozilla
1516

1617
backend:
17-
# Used for enabling authentication, secret is shared by all backend plugins
18-
# See https://backstage.io/docs/auth/service-to-service-auth for
19-
# information on the format
20-
# auth:
21-
# keys:
22-
# - secret: ${BACKEND_SECRET}
2318
baseUrl: http://localhost:7007
2419
listen:
2520
port: 7007
26-
# Uncomment the following host directive to bind to specific interfaces
27-
# host: 127.0.0.1
21+
2822
csp:
2923
connect-src: ["'self'", 'http:', 'https:']
30-
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
31-
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
24+
3225
cors:
3326
origin: http://localhost:3000
3427
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
3528
credentials: true
36-
# This is for local development only, it is not recommended to use this in production
37-
# The production database configuration is stored in app-config.production.yaml
29+
3830
database:
39-
# client: better-sqlite3
40-
# connection: ':memory:'
4131
client: pg
4232
connection:
4333
host: ${POSTGRES_HOST}
4434
port: ${POSTGRES_PORT}
4535
user: ${POSTGRES_USER}
4636
password: ${POSTGRES_PASSWORD}
47-
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
37+
38+
cache:
39+
store: redis
40+
connection: redis://127.0.0.1:6379
4841

4942
integrations:
5043
github:
@@ -78,7 +71,7 @@ techdocs:
7871

7972
auth:
8073
# see https://backstage.io/docs/auth/ to learn about auth providers
81-
environment: 'development'
74+
environment: dev
8275
providers:
8376
# See https://backstage.io/docs/auth/guest/provider
8477
guest: {}
@@ -87,57 +80,22 @@ scaffolder:
8780
# see https://backstage.io/docs/features/software-templates/configuration for software template options
8881

8982
catalog:
90-
providers:
91-
githubOrg:
92-
id: mozilla
93-
githubUrl: https://github.com
94-
orgs: ['mozilla', 'mozilla-services']
95-
schedule:
96-
frequency: { hours: 1 }
97-
timeout: { minutes: 50 }
9883
import:
9984
entityFilename: catalog-info.yaml
10085
pullRequestBranchName: backstage-integration
86+
10187
rules:
10288
- allow: [Component, System, API, Resource, Location]
103-
locations:
104-
# Local example data, file locations are relative to the backend process, typically `packages/backend`
105-
- type: file
106-
target: ../../examples/entities.yaml
107-
108-
# Templates
109-
- type: file
110-
target: ../../examples/template/template.yaml
111-
rules:
112-
- allow: [Template]
11389

90+
locations:
11491
- type: file
115-
target: ../../scaffolder-templates/*/template.yaml
92+
target: /app/scaffolder-templates/*/template.yaml
11693
rules:
117-
- allow: [Template]
94+
- allow:
95+
- Template
11896

119-
# Local example organizational data
120-
- type: file
121-
target: ../../examples/org.yaml
122-
rules:
123-
- allow: [User, Group]
124-
125-
## Uncomment these lines to add more example data
126-
# - type: url
127-
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
128-
129-
## Uncomment these lines to add an example org
130-
# - type: url
131-
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
132-
# rules:
133-
# - allow: [User, Group]
134-
# Experimental: Always use the search method in UrlReaderProcessor.
135-
# New adopters are encouraged to enable it as this behavior will be the default in a future release.
13697
useUrlReadersSearch: true
13798

138-
kubernetes:
139-
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options
140-
14199
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework
142100
permission:
143101
# setting this to `false` will disable permissions

docker-compose.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
services:
2+
postgres:
3+
image: postgres:15
4+
environment:
5+
POSTGRES_PASSWORD: secret
6+
PGDATA: /var/lib/postgresql/data/pgdata
7+
8+
volumes:
9+
- pgdata:/var/lib/postgresql/data
10+
11+
ports:
12+
- 5432:5432
13+
14+
redis:
15+
image: redis:7.2
16+
command: redis-server --save 60 1 --loglevel warning
17+
volumes:
18+
- redisdata:/data
19+
20+
ports:
21+
- 6379:6379
22+
23+
volumes:
24+
pgdata: {}
25+
redisdata: {}

examples/entities.yaml

Lines changed: 0 additions & 41 deletions
This file was deleted.

examples/org.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/template/content/catalog-info.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/template/content/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/template/content/package.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)