Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace hard coded db-path with value at MEILI_DB_PATH passed by user. #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martinpsz
Copy link

Pull Request

Related issue

Fixes #87

What does this PR do?

  • Updates first-login/001-setup-prod.sh to use MEILI_DB_PATH rather than hardcoded db-path to prevent meilisearch-setup from overwriting user specified DB_PATH.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • [ x ] Have you read the contributing guidelines?
  • [ x ] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

…ATH environment variable value rather than a hardcoded location for the meilisearch data file so user's setting is not overwritten on first ssh
Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution!

I asked a question I think it would be very important to be handled before merging!

@@ -40,7 +40,8 @@ After=systemd-user-sessions.service
Type=simple
Environment="MEILI_SERVER_PROVIDER=$MEILISEARCH_SERVER_PROVIDER"
Environment="MEILI_DUMP_DIR=$MEILI_DUMP_DIR"
ExecStart=/usr/bin/meilisearch --db-path /var/lib/meilisearch/data.ms --env $MEILISEARCH_ENVIRONMENT --dump-dir $MEILI_DUMP_DIR
Environment="MEILI_DB_PATH=$MEILI_DB_PATH"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think to prevent breaking for existing users it would be needed to set a default value here, no?:

MEILISEARCH_ENVIRONMENT='development'
MEILISEARCH_SERVER_PROVIDER=provider_name
USE_API_KEY='false'
MEILISEARCH_MASTER_KEY=''
MEILI_DUMP_DIR='/var/opt/meilisearch/dumps'
DOMAIN_NAME=''
USE_SSL='false'
USE_CERTBOT='false'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. My bad. Should I add?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set db-path to $MEILI_DB_PATH rather than hard coding a db-path
2 participants