Revert "Revert "Improvements to instructions""

This commit is contained in:
Vesa Luusua 2018-12-10 13:29:33 +02:00 committed by GitHub
parent 40be9e0184
commit 0dde29f061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 35 deletions

View file

@ -14,10 +14,12 @@ way to update this template, but currently, we follow a pattern:
## Upcoming version 2018-XX-XX
* [change] Update outdated dependencies.
**Note:** Updating Prettier caused multiple file changes mostly to .md files and compose setup.
* [change] Improved documents related to onboarding: env.md, deploying-to-production.md,
map-providers.md [#971](https://github.com/sharetribe/flex-template-web/pull/971)
* [change] Update outdated dependencies.
[#967](https://github.com/sharetribe/flex-template-web/pull/967)
* **Note:** Updating Prettier caused multiple file changes mostly to `.md` files and `compose`
setup.
* [change] Update supported Node version to the latest LTS (10.14).
[#964](https://github.com/sharetribe/flex-template-web/pull/964)
* [add] Add documentation about deploying to production. Also add _deploy to Heroku_ button.

View file

@ -3,7 +3,7 @@
## Getting started
The easiest way to get started is deploying the application to Heroku. Before creating the app you
need three accounts: [Heroku](https://heroku.com/), [Stripe](https://stripe.com/fi) and
need three accounts: [Heroku](https://heroku.com/), [Stripe](https://stripe.com/) and
[MapBox](https://www.mapbox.com/). Creating the accounts is free unless you start heavily using
them.

View file

@ -3,28 +3,28 @@
The following configuration variables can be set to control the Flex template app behaviour. Most of
them have defaults that work for development environment. For production deploys most should be set.
| Variable | Description |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| REACT_APP_MAPBOX_ACCESS_TOKEN | See: [Integrating to map providers](./map-providers.md) |
| REACT_APP_GOOGLE_MAPS_API_KEY | See: [Google Maps API key](./google-maps.md) (Alternative map provider) |
| REACT_APP_SHARETRIBE_SDK_CLIENT_ID | Client ID (API key). You will get this from the Sharetribe team. |
| REACT_APP_STRIPE_PUBLISHABLE_KEY | Stripe publishable API key for generating tokens with Stripe API. Use test key (prefix `pk_test_`) for development. |
| REACT_APP_SHARETRIBE_MARKETPLACE_CURRENCY | The currency used in the Marketplace as ISO 4217 currency code. For example: USD, EUR, CAD, AUD, etc. |
| REACT_APP_CANONICAL_ROOT_URL | Canonical root url of the marketplace. Needed for social media sharing and SEO optimization. |
| NODE_ENV | Node env. Use 'development' for development and 'production' for production. |
| PORT | Port for server to accept connections. |
| REACT_APP_ENV | A more fine grained env definition than NODE_ENV. Is used for example to differentiate envs in logging. |
| REACT_APP_SHARETRIBE_USING_SSL | Redirect HTTP to HTTPS? |
| SERVER_SHARETRIBE_TRUST_PROXY | Set when running the app behind a reverse proxy, e.g. in Heroku. |
| REACT_APP_PUBLIC_SENTRY_DSN | See: [Error logging with Sentry](./sentry.md) |
| SERVER_SENTRY_DSN | See: [Error logging with Sentry](./sentry.md) |
| REACT_APP_CSP | See: [Content Security Policy (CSP)](./content-security-policy.md) |
| BASIC_AUTH_USERNAME | Set to enable HTTP Basic Auth |
| BASIC_AUTH_PASSWORD | Set to enable HTTP Basic Auth |
| REACT_APP_GOOGLE_ANALYTICS_ID | See: [Google Analytics](./analytics.md) |
| REACT_APP_AVAILABILITY_ENABLED | Enables availability calendar for listings. |
| REACT_APP_DEFAULT_SEARCHES_ENABLED | Enables default search suggestions in location autocomplete search input. |
| REACT_APP_SHARETRIBE_SDK_BASE_URL | The base url to access the Sharetribe Flex Marketplace API. FTW uses the correct one by default so no need to set this. |
| Variable | Description |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| REACT_APP_MAPBOX_ACCESS_TOKEN | See: [Integrating to map providers](./map-providers.md) |
| REACT_APP_GOOGLE_MAPS_API_KEY | See: [Google Maps API key](./google-maps.md) (Alternative map provider) |
| REACT_APP_SHARETRIBE_SDK_CLIENT_ID | Client ID (API key). You can get this from the Flex Console. |
| REACT_APP_STRIPE_PUBLISHABLE_KEY | Stripe publishable API key for generating tokens with Stripe API. Use test key (prefix `pk_test_`) for development. The secret key needs to be added to Flex Console. |
| REACT_APP_SHARETRIBE_MARKETPLACE_CURRENCY | The currency used in the Marketplace as ISO 4217 currency code. For example: USD, EUR, CAD, AUD, etc. |
| REACT_APP_CANONICAL_ROOT_URL | Canonical root url of the marketplace. Needed for social media sharing and SEO optimization. |
| NODE_ENV | Node env. Use 'development' for development and 'production' for production. |
| PORT | Port for server to accept connections. |
| REACT_APP_ENV | A more fine grained env definition than NODE_ENV. Is used for example to differentiate envs in logging. |
| REACT_APP_SHARETRIBE_USING_SSL | Redirect HTTP to HTTPS? |
| SERVER_SHARETRIBE_TRUST_PROXY | Set when running the app behind a reverse proxy, e.g. in Heroku. |
| REACT_APP_PUBLIC_SENTRY_DSN | See: [Error logging with Sentry](./sentry.md) |
| SERVER_SENTRY_DSN | See: [Error logging with Sentry](./sentry.md) |
| REACT_APP_CSP | See: [Content Security Policy (CSP)](./content-security-policy.md) |
| BASIC_AUTH_USERNAME | Set to enable HTTP Basic Auth |
| BASIC_AUTH_PASSWORD | Set to enable HTTP Basic Auth |
| REACT_APP_GOOGLE_ANALYTICS_ID | See: [Google Analytics](./analytics.md) |
| REACT_APP_AVAILABILITY_ENABLED | Enables availability calendar for listings. |
| REACT_APP_DEFAULT_SEARCHES_ENABLED | Enables default search suggestions in location autocomplete search input. |
| REACT_APP_SHARETRIBE_SDK_BASE_URL | The base url to access the Sharetribe Flex Marketplace API. FTW uses the correct one by default so no need to set this. |
## Defining configuration

View file

@ -9,18 +9,21 @@ end of this doc).
## Setting up the Mapbox integration (the default map provider)
### 1. Generate a Mapbox access key
### 1. Generate a Mapbox access token
Sign up for a Mapbox and go to [account page](https://www.mapbox.com/account/). Then click
`Create access token`.
[Sign up for a Mapbox](https://www.mapbox.com/signup/) and go to the
[account page](https://www.mapbox.com/account/). Then copy the `Default public token`.
If you prefer to create a new one, click `+ Create a token`, give it a name and make sure all Public
scopes are selected. Create the token and copy its value.
> Read more about
> [access tokens and consider rotating them](https://www.mapbox.com/help/how-access-tokens-work/).
### 2. Setup the application to use the access key
### 2. Setup the application to use the access token
The application uses the `REACT_APP_MAPBOX_ACCESS_TOKEN` environment variable for the key value. For
local development, you can add the variable in the Gitignored `.env` file in the project root:
The application uses the `REACT_APP_MAPBOX_ACCESS_TOKEN` environment variable for the token value.
For local development, you can add the variable in the Gitignored `.env` file in the project root:
```
REACT_APP_MAPBOX_ACCESS_TOKEN=my-access-token-here
@ -33,7 +36,7 @@ specific locations shown by default when the user focuses on the input and hasn'
searches. This reduces the typing required for common searches and also reduces the need to use
Mapbox geolocation API that much.
To use default searches, another environment variable needs to be set:
This is enabled by default but it can be changed via the environment variable:
```
REACT_APP_DEFAULT_SEARCHES_ENABLED=true

View file

@ -234,7 +234,7 @@
"FieldReviewRating.star3": "OK - 3 stars",
"FieldReviewRating.star4": "Good - 4 stars",
"FieldReviewRating.star5": "Awesome - 5 stars",
"Footer.copyright": "© Sharetribe 2017",
"Footer.copyright": "© Sharetribe",
"Footer.goToFacebook": "Go to Facebook page",
"Footer.goToInstagram": "Go to Instagram page",
"Footer.goToTwitter": "Go to Twitter page",

View file

@ -234,7 +234,7 @@
"FieldReviewRating.star3": "Moyen - 3 étoiles",
"FieldReviewRating.star4": "Correct - 4 étoiles",
"FieldReviewRating.star5": "Génial - 5 étoiles",
"Footer.copyright": "© Sharetribe 2017",
"Footer.copyright": "© Sharetribe",
"Footer.goToFacebook": "Aller sur la page Facebook",
"Footer.goToInstagram": "Aller sur la page Instagram",
"Footer.goToTwitter": "Aller sur le compe Twitter",