-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
79 lines (53 loc) · 2.45 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# capSquad Presents: ultraCast
## Running on CSE
Running Ultracast from CSE is simple. Simply run:
```
./start.sh
```
The script `start.sh` will:
* Create a python venv for the backend
* Install all required python packages in the venv
* Install all npm packages that are required for the frontend
* Launch the backend webserver
* Launch the frontend
* Open ultracast in your browser (may not work on vlab)
Once the setup is completed and UltraCast is launched you will see a message like:
```
Serving frontend at http://localhost:43689/
```
To avoid failing to launch because a port is already in use, the port which is used is decided at runtime.
You can then navigate in a webbrowser to the link printed to the terminal to use UltraCast
## Advanced Usage
### Local Backend Instance
You can configure the frontend at runtime to use a local backend webserver for GraphQL queries instead of the remote webserver.
**It is highly recommended not to run UltraCast in local mode on UNSW CSE machines as the port used for the GraphQL endpoint is often already in use**
To do this:
```
./start.sh --local
```
### Alternative Backend Run Methods
There are two scripts which can be used to run the site's backend:
* `backend/start.sh` runs the backend in a development environment (debugging enable and with a development WSGI webserver)
* `backend/start_production.sh` runs the backend in a production environment
* Production WSGI webserver with multiple worker processes
* Disable debugging prints etc.
## Configuration
### Backend
The backend is configured by using python files which set various configuration variables.
These include options including:
* The IP address of the MonogDB instance
* The MonogDB database
* Flask secret keys (for encryption)
* Algolia API key and user
Any variables that are not set are defaulted to the value in `backend/config/default_settings.py`.
You can override these settings by writing a new python file and setting the environment variable `ULTRACAST_BACKEND_SETTINGS` to be the real path of this file.
For example if the settings file is at `~/ultracast_settings.py`, you could do:
```
export ULTRACAST_BACKEND_SETTINGS=$(realpath ~/ultracast_settings.py)
bash backend/start.sh
```
### Frontend
The frontend can be configured by editing the file `frontend/src/api/config.js`
Here you can set options including:
* The backend GraphQL endpoint to use
* Algolia API key and user