Configure Heroku integration
This commit is contained in:
parent
596e93a3db
commit
4b0254c370
4 changed files with 48 additions and 7 deletions
19
README.md
19
README.md
|
@ -4,13 +4,21 @@
|
||||||
|
|
||||||
A GraphQL-powered, single-page dashboard application for [Saleor](https://github.com/mirumee/saleor/).
|
A GraphQL-powered, single-page dashboard application for [Saleor](https://github.com/mirumee/saleor/).
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
See the [public demo](https://demo.getsaleor.com/dashboard/next/) of Saleor Dashboard!
|
||||||
|
|
||||||
|
Or launch the demo on a free Heroku instance.
|
||||||
|
|
||||||
|
[](https://heroku.com/deploy)
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
|
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Node.js 10.0+
|
- Node.js 10.0+
|
||||||
- A running instance of [Saleor](https://github.com/mirumee/saleor/).
|
- A running instance of [Saleor](https://github.com/mirumee/saleor/).
|
||||||
|
|
||||||
### Installing
|
### Installing
|
||||||
|
@ -37,12 +45,11 @@ $ npm i
|
||||||
|
|
||||||
There are two environment variables available for configuration:
|
There are two environment variables available for configuration:
|
||||||
|
|
||||||
- `API_URI` (required) - URI of a running instance of Saleor GraphQL API.
|
- `API_URI` (required) - URI of a running instance of Saleor GraphQL API.
|
||||||
If you are running Saleor locally with the default settings, set `API_URI` to: `http://localhost:8000/graphql/`.
|
If you are running Saleor locally with the default settings, set `API_URI` to: `http://localhost:8000/graphql/`.
|
||||||
|
|
||||||
- `APP_MOUNT_URI` - URI at which the Dashboard app will be mounted.
|
|
||||||
E.g. if you set `APP_MOUNT_URI` to `/dashboard/`, your app will be mounted at `http://localhost:9000/dashboard/`.
|
|
||||||
|
|
||||||
|
- `APP_MOUNT_URI` - URI at which the Dashboard app will be mounted.
|
||||||
|
E.g. if you set `APP_MOUNT_URI` to `/dashboard/`, your app will be mounted at `http://localhost:9000/dashboard/`.
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
|
|
26
app.json
Normal file
26
app.json
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "saleor-dashboard",
|
||||||
|
"description": "A GraphQL-powered, single-page dashboard application for Saleor",
|
||||||
|
"repository": "https://github.com/mirumee/saleor-dashboard",
|
||||||
|
"website": "http://getsaleor.com/",
|
||||||
|
"logo": "https://mirumee.com/img/opensource_saleor.jpg",
|
||||||
|
"keywords": ["saleor", "e-commerce", "dashboard"],
|
||||||
|
"env": {
|
||||||
|
"API_URI": {
|
||||||
|
"description": "URI of a running instance of Saleor GraphQL API",
|
||||||
|
"value": "https://demo.getsaleor.com/graphql/"
|
||||||
|
},
|
||||||
|
"APP_MOUNT_URI": {
|
||||||
|
"description": "URI at which the Dashboard app will be mounted",
|
||||||
|
"value": "/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"buildpacks": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/heroku/heroku-buildpack-nodejs.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/heroku/heroku-buildpack-static.git"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -171,6 +171,7 @@
|
||||||
"storybook": "start-storybook -p 3000 -c src/storybook/",
|
"storybook": "start-storybook -p 3000 -c src/storybook/",
|
||||||
"build-storybook": "build-storybook -c src/storybook/ -o build/storybook",
|
"build-storybook": "build-storybook -c src/storybook/ -o build/storybook",
|
||||||
"test": "jest src/",
|
"test": "jest src/",
|
||||||
"test-e2e": "testcafe 'chrome:headless' .testcafe"
|
"test-e2e": "testcafe 'chrome:headless' .testcafe",
|
||||||
|
"heroku-postbuild": "npm run build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
7
static.json
Normal file
7
static.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"root": "build/dashboard/",
|
||||||
|
"https_only": true,
|
||||||
|
"routes": {
|
||||||
|
"/**": "index.html"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue