14813: Fix to use cluster config when local config values aren't defined
[arvados-workbench2.git] / README.md
1 [comment]: # (Copyright © The Arvados Authors. All rights reserved.)
2 [comment]: # ()
3 [comment]: # (SPDX-License-Identifier: CC-BY-SA-3.0)
4
5 ## Arvados Workbench 2
6
7 ### Setup
8 <pre>
9 brew install yarn
10 yarn install
11 </pre>
12 Install [redux-devtools-extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
13
14 ### Start project
15 <code>yarn start</code>
16
17 ### Run tests
18 <pre>
19 yarn install
20 yarn test
21 </pre>
22
23 ### Production build
24 <pre>
25 yarn install
26 yarn build
27 </pre>
28
29 ### Build time configuration
30 You can customize project global variables using env variables. Default values are placed in the `.env` file.
31
32 Example:
33 ```
34 REACT_APP_ARVADOS_CONFIG_URL=config.json yarn build
35 ```
36
37 ### Run time configuration
38 The app will fetch runtime configuration when starting. By default it will try to fetch `/config.json`. You can customize this url using build time configuration.
39
40 Currently this configuration schema is supported:
41 ```
42 {
43     "API_HOST": "string",
44     "VOCABULARY_URL": "string",
45     "FILE_VIEWERS_CONFIG_URL": "string",
46 }
47 ```
48
49 #### VOCABULARY_URL
50 Local path, or any URL that allows cross-origin requests. See 
51 [Vocabulary JSON file example](public/vocabulary-example.json).
52
53 To use the URL defined in the Arvados cluster configuration, remove the entire VOCABULARY_URL entry from the runtime configuration. Found in `/config.json` by default.
54
55 ### FILE_VIEWERS_CONFIG_URL
56 Local path, or any URL that allows cross-origin requests. See:
57
58 [File viewers config file example](public/file-viewers-example.json)
59
60 [File viewers config scheme](src/models/file-viewers-config.ts)
61
62 To use the URL defined in the Arvados cluster configuration, remove the entire FILE_VIEWERS_CONFIG_URL entry from the runtime configuration. Found in `/config.json` by default.
63
64 ### Licensing
65
66 Arvados is Free Software. See COPYING for information about Arvados Free
67 Software licenses.