Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku integration #175

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ All notable, unreleased changes to this project will be documented in this file.
- Implement the Credential Management API - #158 by @patrys
- Add search bars - #172 by @dominik-zeglen
- Add sorting to product list - #173 by @dominik-zeglen
- Add Heroku integration - #175 by @bogdal
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@

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.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

- Node.js 10.0+
- Node.js 10.0+
- A running instance of [Saleor](https://github.com/mirumee/saleor/).

### Installing
Expand All @@ -37,12 +45,11 @@ $ npm i

There are two environment variables available for configuration:

- `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/`.

- `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/`.
- `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/`.

- `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

Expand Down
26 changes: 26 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
"storybook": "start-storybook -p 3000 -c src/storybook/",
"build-storybook": "build-storybook -c src/storybook/ -o build/storybook",
"test": "jest src/",
"test-e2e": "testcafe 'chrome:headless' .testcafe"
"test-e2e": "testcafe 'chrome:headless' .testcafe",
"heroku-postbuild": "npm run build"
}
}
7 changes: 7 additions & 0 deletions static.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"root": "build/dashboard/",
"https_only": true,
"routes": {
"/**": "index.html"
}
}