diff options
Diffstat (limited to 'docs/content/doc/developers/hacking-on-gitea.en-us.md')
-rw-r--r-- | docs/content/doc/developers/hacking-on-gitea.en-us.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/content/doc/developers/hacking-on-gitea.en-us.md b/docs/content/doc/developers/hacking-on-gitea.en-us.md index 5481a2f1fe..6e9a98e126 100644 --- a/docs/content/doc/developers/hacking-on-gitea.en-us.md +++ b/docs/content/doc/developers/hacking-on-gitea.en-us.md @@ -187,6 +187,27 @@ make lint-frontend Note: When working on frontend code, set `USE_SERVICE_WORKER` to `false` in `app.ini` to prevent undesirable caching of frontend assets. +### Configuring local ElasticSearch instance + +Start local ElasticSearch instance using docker: + +```sh +mkdir -p $(pwd)/data/elasticsearch +sudo chown -R 1000:1000 $(pwd)/data/elasticsearch +docker run --rm -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" -v "$(pwd)/data/elasticsearch:/usr/share/elasticsearch/data" docker.elastic.co/elasticsearch/elasticsearch:7.16.3 +``` + +Configure `app.ini`: + +```ini +[indexer] +ISSUE_INDEXER_TYPE = elasticsearch +ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200 +REPO_INDEXER_ENABLED = true +REPO_INDEXER_TYPE = elasticsearch +REPO_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200 +``` + ### Building and adding SVGs SVG icons are built using the `make svg` target which compiles the icon sources defined in `build/generate-svg.js` into the output directory `public/img/svg`. Custom icons can be added in the `web_src/svg` directory. |