Configuring Backstage


Configuring PostgreSQL

Now that PostgreSQL is installed on your machine, we can tell Backstage to use it.

Earlier you saw the main Backstage configuration file, app-config.yaml in the root directory of your Backstage app. Backstage also supports environment-specific configuration overrides, by way of an app-config.<environment>.yaml file. This is where you'll add the database configuration, since you’re setting up a database on your local machine right now.

Open the app-config.local.yaml file in the root directory of your Backstage app (create if it doesn't exist), and add:

      host: localhost
      # Default postgresql port is 5432; this might be different for your installation
      port: 5432
      user: postgres
      # Replace the password below with your postgresql password:
      password: secret

The default .gitignore file created with the app excludes *.local.yaml from source control for you, so you can add passwords or tokens directly into the app-config.local.yaml.

Start Backstage from the terminal, by typing yarn dev and pressing enter. As soon as it states:

[0] webpack compiled successfully

You're good to go and explore Backstage again. Note that if you've made any changes before, they might be gone. The default database is not persistent.