Skip to content

Commit

Permalink
improvement: add REINDEX_DATASETS environment variable to Argilla s…
Browse files Browse the repository at this point in the history
…erver Docker image (#5268)

# Description



**Type of change**

- Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**

- [x] The image should be correctly generated and we will check it on
dev environment (if reindex is correctly done).

**Checklist**

- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
  • Loading branch information
jfcalvo authored Jul 19, 2024
1 parent 8a47202 commit 6bed802
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions argilla-server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ These are the section headers that we use:
- Added new `ARGILLA_DATABASE_POSTGRESQL_POOL_SIZE` environment variable allowing to set the number of connections to keep open inside the database connection pool. ([#5220](https://github.com/argilla-io/argilla/pull/5220))
- Added new `ARGILLA_DATABASE_POSTGRESQL_MAX_OVERFLOW` environment variable allowing to set the number of connections that can be opened above and beyond the `ARGILLA_DATABASE_POSTGRESQL_POOL_SIZE` setting. ([#5220](https://github.com/argilla-io/argilla/pull/5220))
- Added new `Server-Timing` header to all responses with the total time in milliseconds the server took to generate the response. ([#5239](https://github.com/argilla-io/argilla/pull/5239))
- Added `REINDEX_DATASETS` environment variable to Argilla server Docker image. ([#5268](https://github.com/argilla-io/argilla/pull/5268))

### Changed

Expand Down
8 changes: 7 additions & 1 deletion argilla-server/docker/server/scripts/start_argilla_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ set -e
python -m argilla_server database migrate

# Create default user
if [ "$DEFAULT_USER_ENABLED" = "true" ]; then
if [ "$DEFAULT_USER_ENABLED" = "true" ] || [ "$DEFAULT_USER_ENABLED" = "1" ]; then
python -m argilla_server database users create_default --password $DEFAULT_USER_PASSWORD --api-key $DEFAULT_USER_API_KEY
fi

# Reindexing data into search engine
if [ "$REINDEX_DATASETS" == "true" ] || [ "$REINDEX_DATASETS" == "1" ]; then
echo "Reindexing existing datasets"
python -m argilla_server search-engine reindex
fi

# Run argilla-server (See https://www.uvicorn.org/settings/#settings)
#
# From uvicorn docs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,8 @@ argilla server search-engine reindex --feedback-dataset-id 08476931-ac30-4eec-9a

::::

If you are using the quickstart docker image, you can set the `REINDEX_DATASETS` environment variable to `true` to reindex the datasets.
You can visit the [Docker Quickstart](/getting_started/installation/deployments/docker-quickstart) deployment page for more information.
You can set the `REINDEX_DATASETS` environment variable to `true` to reindex the datasets.

:::

::::

0 comments on commit 6bed802

Please sign in to comment.