feat(docker-compose): added a simple docker compose to get people started with example backend and frontend
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
frontend:
|
||||
image: 'spotify/backstage:latest'
|
||||
ports:
|
||||
- '3000:80'
|
||||
environment: &environment
|
||||
ROLLBAR_ACCOUNT_TOKEN: TOKEN
|
||||
SENTRY_TOKEN: TOKEN
|
||||
GITHUB_ACCESS_TOKEN: TOKEN
|
||||
backend:
|
||||
image: 'example-backend:latest'
|
||||
ports:
|
||||
- '7000:7000'
|
||||
environment: *environment
|
||||
@@ -0,0 +1,27 @@
|
||||
# Deployment (Other)
|
||||
|
||||
## Deploying Locally
|
||||
|
||||
### Try on Docker
|
||||
|
||||
Run the following commands if you have Docker environment
|
||||
|
||||
```bash
|
||||
$ yarn docker-build
|
||||
$ docker run --rm -it -p 80:80 spotify/backstage
|
||||
```
|
||||
|
||||
Then open http://localhost/ on your browser.
|
||||
|
||||
### Running with `docker-compose`
|
||||
|
||||
Run the following commands if you have docker and docker-compose for a full
|
||||
example, with the example backend also deployed.
|
||||
|
||||
```bash
|
||||
$ yarn docker-build:all
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
Then open http://localhost/ on your browser to see the example app with an
|
||||
example backend.
|
||||
|
||||
@@ -80,7 +80,7 @@ yarn diff # Make sure all plugins are up to date with the latest plugin template
|
||||
yarn create-plugin # Create a new plugin
|
||||
```
|
||||
|
||||
### (Optional)Try on Docker
|
||||
### (Optional) Try on Docker
|
||||
|
||||
Run the following commands if you have Docker environment
|
||||
|
||||
@@ -91,6 +91,8 @@ $ docker run --rm -it -p 80:80 spotify/backstage
|
||||
|
||||
Then open http://localhost/ on your browser.
|
||||
|
||||
### (Optional) Running with Docker-Compose
|
||||
|
||||
> See [package.json](/package.json) for other yarn commands/options.
|
||||
|
||||
[Next Step - Create a Backstage plugin](create-a-plugin.md)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"lint:all": "lerna run lint --",
|
||||
"lint:type-deps": "node scripts/check-type-dependencies.js",
|
||||
"docker-build": "yarn bundle && docker build . -t spotify/backstage",
|
||||
"docker-build:all": "yarn tsc && yarn build && yarn docker-build && yarn workspace example-backend build-image",
|
||||
"create-plugin": "backstage-cli create-plugin",
|
||||
"remove-plugin": "backstage-cli remove-plugin",
|
||||
"release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push; fi",
|
||||
|
||||
Reference in New Issue
Block a user