|
7 | 7 |
|
8 | 8 | ## Running
|
9 | 9 |
|
10 |
| -Clone the repository and with [yarn](https://yarnpkg.com/en/) and [node v8](https://nodejs.org/en/) installed run `yarn start`. Changes to JavaScript and CSS will be rebuilt automatically. Refresh your web page to see changes. Changes to configuration files require a full stop and fresh `yarn start`. |
| 10 | +Clone the repository and with [yarn](https://yarnpkg.com/en/) and [node v10](https://nodejs.org/en/) installed run `yarn run dev`. Taui is built and run with [next.js](https://nextjs.org) and [now](https://now.js). |
11 | 11 |
|
12 | 12 | ## Configuration
|
13 | 13 |
|
14 |
| -Taui allows changing it's source data live by default. It's set via JSON and an example can be found in `config.json.tmp`. Opportunities can be set in the `grids` field and transit networks generated by an r5 regional analysis can be set in networks. |
| 14 | +Copy the `empty-store.json` file to `store.json`. This file populates the data used for running a Taui. |
15 | 15 |
|
16 |
| -For permanent deployments, set `DISABLE_CONFIG: true` in the `env.yml` file and set the configuration data in `store.yml` under the `data` field. |
| 16 | +**Key fields:** |
17 | 17 |
|
18 |
| -## Deploy |
| 18 | +* `allowChangeConfig` -- Set to `false` when deploying a site for a user. |
| 19 | +* `map.accessToken` -- A [Mapbox](https://mapbox.com) access token is required for Mapbox GL maps and Mapbox Geocoding to work. |
| 20 | +* `grids` -- Point sets or opportunities can be set here. |
| 21 | +* `networks` -- A url to an S3 bucket containing the results of regional analysis generated from R5. |
| 22 | +* `poiUrl` -- URL to a GeoJSON file that contains a `FeatureCollection` of `Points` to be shown on the map. Add a `label` to the `properties` field of each point. |
19 | 23 |
|
20 |
| -Once you see that TAUI is working properly with your static site data, deploy it to the S3 bucket specified in settings.yml with the following command (replacing the --config switch to point to your configuration directory): |
| 24 | +## Deployment |
21 | 25 |
|
22 |
| -`mastarm deploy --config configurations/marseilles --minify --env production` |
23 |
| - |
24 |
| -The AWS SDK for JS will detect and use the same AWS credentials you should have set up for AWSCLI. The deployment copies JS and CSS files into a sub-bucket called assets, but does not upload `index.html`. You need to edit `index.html` in the root of the TAUI repository to customize the page name, then upload it with `aws s3 cp index.html s3://your-bucket-name/index.html`. |
25 |
| - |
26 |
| -`mastarm deploy` will not create the bucket or set its contents public. You need to ensure the bucket exists before running `mastarm deploy` and set all its contents public afterward using the S3 web console or CLI. You don’t need to set any permissions on the bucket itself. |
27 |
| - |
28 |
| -If S3 reports “access denied” when you try to fetch a page over HTTP in your browser, this is often because an object you are requesting does not exist. |
| 26 | +[](https://deploy.now.sh/?repo=https://github.com/conveyal/taui) |
29 | 27 |
|
30 | 28 | [npm-image]: https://img.shields.io/npm/v/@conveyal/taui.svg?maxAge=2592000&style=flat-square
|
31 | 29 | [npm-url]: https://www.npmjs.com/package/@conveyal/taui
|
|
0 commit comments