2020-09-21 10:37:05 +02:00
|
|
|
**We need a recent version of npm**
|
|
|
|
|
2021-03-31 09:17:56 +02:00
|
|
|
### OS Specific
|
|
|
|
On debian 10 you need to install:
|
|
|
|
|
|
|
|
```
|
|
|
|
apt install -y curl
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
|
|
|
```
|
|
|
|
|
|
|
|
Installation
|
|
|
|
-----
|
|
|
|
|
2020-09-21 10:37:05 +02:00
|
|
|
- clone repo to **/var/www/ffplayout-frontend**
|
|
|
|
- cd in repo
|
|
|
|
- install dependencies: `npm install`
|
|
|
|
- create **.env** file:
|
|
|
|
```
|
2021-03-31 09:17:56 +02:00
|
|
|
BASE_URL='http://example.org'
|
2020-09-21 10:37:05 +02:00
|
|
|
API_URL='/'
|
|
|
|
```
|
2021-03-31 09:17:56 +02:00
|
|
|
- in dev mode `BASE_URL` should be `http://localhost:3000` and `API_URL=http://localhost:8000`
|
|
|
|
|
2020-09-21 10:37:05 +02:00
|
|
|
- create symlink for the media folder
|
|
|
|
- when your media folder is a subfolder (for example `/opt/ffplayout/media`) create the same folder structure under **static**:
|
|
|
|
- `mkdir -p /var/www/ffplayout-frontend/static/opt/ffplayout`
|
|
|
|
- `ln -s /opt/ffplayout/media /var/www/ffplayout-frontend/static/opt/ffplayout/`
|
|
|
|
- build app: `npm run build`
|
|
|
|
|
2021-03-31 09:17:56 +02:00
|
|
|
Your frontend should be now in **/var/www/ffplayout-frontend/dist** folder, which is included in the nginx config.
|
2020-09-21 10:37:05 +02:00
|
|
|
|
2021-03-31 09:17:56 +02:00
|
|
|
Copy **docs/ffplayout.conf** to **/etc/nginx/sites-available/** and make a symlink:
|
2020-09-21 10:37:05 +02:00
|
|
|
|
2021-03-31 09:17:56 +02:00
|
|
|
`ln -s /etc/nginx/sites-available/ffplayout.conf /etc/nginx/sites-enabled/`
|
2020-09-21 10:37:05 +02:00
|
|
|
|
2021-03-31 09:17:56 +02:00
|
|
|
Change the nginx config and add your ssl configuration. After restarting nginx, you should be able to open to frontend in your browser.
|