Update package build
[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 ### Package build
30 <pre>
31 docker build -t arvados/fpm .
32 docker run -v$PWD:$PWD -w $PWD arvados/fpm make packages
33 </pre>
34
35 ### Build time configuration
36 You can customize project global variables using env variables. Default values are placed in the `.env` file.
37
38 Example:
39 ```
40 REACT_APP_ARVADOS_CONFIG_URL=config.json yarn build
41 ```
42
43 ### Run time configuration
44 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.
45
46 Currently this configuration schema is supported:
47 ```
48 {
49     "API_HOST": "string",
50     "VOCABULARY_URL": "string",
51     "FILE_VIEWERS_CONFIG_URL": "string",
52 }
53 ```
54
55 #### API_HOST
56
57 The Arvados base URL.
58
59 The `REACT_APP_ARVADOS_API_HOST` environment variable can be used to set the default URL if the run time configuration is unreachable.
60
61 #### VOCABULARY_URL
62 Local path, or any URL that allows cross-origin requests. See
63 [Vocabulary JSON file example](public/vocabulary-example.json).
64
65 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.
66
67 ### FILE_VIEWERS_CONFIG_URL
68 Local path, or any URL that allows cross-origin requests. See:
69
70 [File viewers config file example](public/file-viewers-example.json)
71
72 [File viewers config scheme](src/models/file-viewers-config.ts)
73
74 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.
75
76 ### Licensing
77
78 Arvados is Free Software. See COPYING for information about Arvados Free
79 Software licenses.