sepia-search-motore-di-rice.../README.md

59 lines
1.2 KiB
Markdown
Raw Normal View History

2020-02-13 11:49:03 +01:00
# Application behind search.joinpeertube.org
## Dev
```terminal
$ git submodule update --init --recursive
$ yarn install --pure-lockfile
```
Indexes in Meilisearch are automatically created by PeerTube at startup.
2020-02-13 11:49:03 +01:00
2020-09-02 10:17:50 +02:00
Run simultaneously (for example with 3 terminals):
2020-02-13 11:49:03 +01:00
```terminal
2024-01-15 10:20:50 +01:00
$ npm run tsc -- -w
2020-02-13 11:49:03 +01:00
```
```terminal
$ node dist/server
```
2020-09-02 10:17:50 +02:00
```
2022-02-23 15:21:02 +01:00
$ cd client && npm run dev
2020-09-02 10:17:50 +02:00
```
Then open http://localhost:8080.
2020-02-13 11:49:03 +01:00
2021-07-28 13:34:53 +02:00
### Add locale
2022-07-25 11:10:46 +02:00
Add the locale in `client/src/main.ts` and `client/gettext.config.js` and run `npm run i18n:update`.
2021-07-28 13:34:53 +02:00
2020-02-13 11:49:03 +01:00
## Production
2024-01-15 09:23:32 +01:00
### Installation
2020-05-28 15:00:37 +02:00
Install dependencies:
2024-01-15 09:23:32 +01:00
* NodeJS (v18)
* MeiliSearch
2020-05-28 15:00:37 +02:00
2020-02-13 11:49:03 +01:00
```terminal
2021-07-28 13:34:53 +02:00
$ git clone https://framagit.org/framasoft/peertube/search-index.git /var/www/peertube-search-index
$ cd /var/www/peertube-search-index
2020-02-13 11:49:03 +01:00
$ yarn install --pure-lockfile
$ npm run build
2020-05-28 15:00:37 +02:00
$ cp config/default.yaml config/production.yaml
$ vim config/production.yaml
2021-07-28 13:34:53 +02:00
$ NODE_ENV=production NODE_CONFIG_DIR=/var/www/peertube-search-index/config node dist/server.js
2020-02-13 11:49:03 +01:00
```
2024-01-15 09:23:32 +01:00
### Upgrade
```
cd /var/www/peertube-search-index && \
git pull origin master && \
yarn install --pure-lockfile && \
npm run build && \
sudo systemctl restart peertube-search-index.service
```