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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/first-login/001-setup-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 :)

ExecStart=/usr/bin/meilisearch --db-path $MEILI_DB_PATH --env $MEILISEARCH_ENVIRONMENT --dump-dir $MEILI_DUMP_DIR

[Install]
WantedBy=default.target
Expand All @@ -60,7 +61,8 @@ Type=simple
Environment="MEILI_MASTER_KEY=$MEILISEARCH_MASTER_KEY"
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"
ExecStart=/usr/bin/meilisearch --db-path $MEILI_DB_PATH --env $MEILISEARCH_ENVIRONMENT --dump-dir $MEILI_DUMP_DIR

[Install]
WantedBy=default.target
Expand Down
Loading