# Configuration for /etc/init.d/meilisearch

# Path to the base directory for storing Meilisearch data (database, dumps,
# snapshots...). This will be set as the working directory for the meilisearch
# process, so all relative paths will be resolved against this directory.
#datadir="/var/lib/meilisearch"

# User (and group) to run meilisearch as.
#command_user="meilisearch"

# If you want to log to a file instead of syslog, uncomment this and set
# MEILI_SYSLOG to "no".
# logfile="/var/log/meilisearch.log"

# Uncomment to run with process supervisor.
# supervisor=supervise-daemon

#
# Declare any Meilisearch configuration variables below.
# https://docs.meilisearch.com/learn/configuration/instance_options.html
#
## BEGIN environment variables
set -a  # enable auto-export variables

# Configures the instance's environment. Value must be either "production"
# or "development".
MEILI_ENV="production"

# Sets the HTTP address and port Meilisearch will use.
MEILI_HTTP_ADDR="127.0.0.1:7700"

# Sets the instance's master key, automatically protecting all routes except
# GET /health. The value must be an alphanumeric string.
# This option is mandatory when MEILI_ENV is "production"!
# NOTE: The init script will automatically replace "change-me" value with
# a random string on the service start if MEILI_ENV is "production".
MEILI_MASTER_KEY="change-me"

# Defines how much detail should be present in Meilisearch's logs. Value must
# be one of ERROR, WARN, INFO, DEBUG, or TRACE (not supported with syslog).
MEILI_LOG_LEVEL="WARN"

# Send log messages to the local syslog instead of stderr.
MEILI_SYSLOG="yes"

# Sets the maximum size of the index. Value must be given in bytes or
# explicitly stating a base unit. For example, the default value can be written
# as 107374182400, "107.7Gb", or "107374 Mb".
MEILI_MAX_INDEX_SIZE="5Gb"

# Sets the maximum amount of RAM Meilisearch can use when indexing. By default,
# Meilisearch uses no more than 2/3 of available memory.
#MEILI_MAX_INDEXING_MEMORY=

# Sets the maximum number of threads Meilisearch can use during indexation.
# By default, the indexer avoids using more than half of a machine's total
# processing units.
#MEILI_MAX_INDEXING_THREADS=

# Sets the maximum size of the task database. Value must be given in bytes or
# explicitly stating a base unit. For example, the default value can be written
# as 107374182400, "107.7Gb", or "107374 Mb".
MEILI_MAX_TASK_DB_SIZE="1Gb"

# Sets the maximum size of accepted payloads.
#MEILI_HTTP_PAYLOAD_SIZE_LIMIT="100MB"


## Schedule snapshot creation

# Activates scheduled snapshots when provided. Snapshots are disabled by default.
#MEILI_SCHEDULE_SNAPSHOT="no"

# Defines the interval between each snapshot. Value must be given in seconds.
#MEILI_SNAPSHOT_INTERVAL_SEC=86400


## SSL options

# Enables client authentication in the specified path.
# MEILI_SSL_AUTH_PATH="/etc/meilisearch/client-ca.crt"

# Sets the server's SSL certificates. Value must be a path to PEM-formatted
# certificates. The first certificate should certify the KEYFILE supplied
# by MEILI_SSL_KEY_PATH. The last certificate should be a root CA.
# MEILI_SSL_CERT_PATH="/etc/meilisearch/server.crt"

# Sets the server's SSL key files. Value must be a path to an RSA private key
# or PKCS8-encoded private key, both in PEM format.
# MEILI_SSL_KEY_PATH="/etc/meilisearch/server.key"

# Sets the server's OCSP file. Reads DER-encoded OCSP response from OCSPFILE
# and staple to certificate.
# MEILI_SSL_OCSP_PATH="/etc/meilisearch/server.ocsp"

# Make SSL authentication mandatory. Sends a fatal alert if the client does not
# complete client authentication.
#MEILI_SSL_REQUIRE_AUTH="no"

# Activates SSL session resumption.
#MEILI_SSL_RESUMPTION="no"

# Activates SSL tickets.
#MEILI_SSL_TICKETS="no"

set +a  # disable auto-export variables (don't remove!)
## END environment variables
