Merge pull request #279 from inductor/feature/docker

Add Docker
This commit is contained in:
Patrik Oldsberg
2020-03-18 09:51:00 +01:00
committed by GitHub
3 changed files with 34 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
.git
node_modules
packages/*/node_modules
packages/*/dist
plugins/*/node_modules
plugins/*/dist
+17
View File
@@ -0,0 +1,17 @@
FROM node:12 as builder
WORKDIR /app
COPY package.json yarn.lock .yarnrc .npmrc /app/
COPY .yarn /app/.yarn
COPY packages /app/packages
COPY plugins /app/plugins
RUN yarn
COPY . .
RUN yarn build
FROM nginx:mainline
COPY --from=builder /app/packages/app/build /usr/share/nginx/html
+11
View File
@@ -57,6 +57,17 @@ $ yarn start
The final `yarn start` command should open a local instance of Backstage in your browser, otherwise open one of the URLs printed in the terminal.
### (Optional)Try on Docker
Run the following commands if you have Docker environment
```bash
$ docker build . -t spotify/backstage
$ docker run --rm -it -p 80:80 spotify/backstage
```
Then open http://localhost/ on your browser.
## Documentation
- [Create a Plugin](docs/getting-started/create-a-plugin.md)