Skip to content

siavashoutadi/backstage-deploy

Repository files navigation

Development

Install dependencies

First run the following command to download the dependencies.

yarn install

Create database

./tasks db-run

Set required variables

Open the environment variable file.

vi .env/dev

And add the following content.

Note: For the Github credentials follow the backstage doc for authentication and github integration.

set -o allexport
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=backstage
POSTGRES_PASSWORD=backstage
GITHUB_TOKEN=ghp_xxxx
GITHUB_CLIENT_ID=xxx
GITHUB_CLIENT_SECRET=xxx
set +o allexport

Run development server

./tasks dev

Build docker image

For building a docker image run the following command.

./tasks build

Run the docker image

A docker compose file is created for deploying the app more conveniently. It starts a postgres and backstage.

First, open the environment variable file.

vi .env/docker

And add the following content.

Note: For the Github credentials follow the backstage doc for authentication and github integration.

set -o allexport
POSTGRES_PASSWORD=backstage
GITHUB_TOKEN=ghp_xxxx # Classic personal token with repo and workflow permissions
GITHUB_CLIENT_ID=xxx
GITHUB_CLIENT_SECRET=xxx
DOCKER_IMAGE_TAG=$(git rev-parse --short HEAD)
set +o allexport

Create the network by running the following command.

docker network create backstage

Now it is time to run the image using docker compose using command below.

./tasks docker-up

After testing the docker can be stopped by following command.

./tasks docker-down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published