Setup readme

This commit is contained in:
Viktor Lofgren 2023-03-04 16:12:37 +01:00
parent 036adcbe1f
commit 592766ba65

View File

@ -10,41 +10,40 @@ While the system is designed to run bare metal in production,
for local development, you're strongly encouraged to use docker
or podman.
From a fresh to running system, you'll need to do this:
To go from a clean check out of the git repo to a running search engine,
follow these steps. You're assumed to sit in the project root the whole time.
From the project root run the one-time setup, it will create the
1. Run the one-time setup, it will create the
basic runtime directory structure
```
$ run/setup.sh
```
Next, compile the project and build docker images
2. Compile the project and build docker images
```
$ ./gradlew assemble docker
```
Next, download a sample of crawl data, process it and stick the metadata
into the database. The data is only downloaded once.
Grab a cup of coffee, this takes a few minutes.
This needs to be done whenever the crawler or processor has changed.
3. Download a sample of crawl data, process it and stick the metadata
into the database. The data is only downloaded once. Grab a cup of coffee, this takes a few minutes.
This needs to be done whenever the crawler or processor has changed.
```
$ docker-compose up -d mariadb
$ run/reconvert.sh
```
Now we're ready to bring the system online.
4. Bring the system online. We'll run it in the foreground in the terminal this time
because it's educational to see the logs. Add `-d` to run in the background.
```
$ docker-compose up
```
Since we've just processed new crawl data, the system needs to construct static
indexes. This takes a moment. Wait for the line 'Auto-conversion finished!'
5. Since we've just processed new crawl data, the system needs to construct static
indexes. Wait for the line 'Auto-conversion finished!'
When all is done, it should be possible to visit
[http://localhost:8080](http://localhost:8080) and try a few searches!
[http://localhost:8080](http://localhost:8080) and try a few searches!