-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstart-meilisearch.sh
More file actions
executable file
·27 lines (21 loc) · 979 Bytes
/
start-meilisearch.sh
File metadata and controls
executable file
·27 lines (21 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# Map input values from the GitHub Actions workflow to shell variables
MEILISEARCH_VERSION=$1
MEILISEARCH_PORT=$2
MEILISEARCH_API_KEY=$3
if [ -z "$MEILISEARCH_API_KEY" ]; then
echo "::group::Starting Meilisearch server"
echo " - port [$MEILISEARCH_PORT]"
echo " - version [$MEILISEARCH_VERSION]"
echo ""
docker run --name meilisearch --publish $MEILISEARCH_PORT:$MEILISEARCH_PORT -e MEILI_NO_ANALYTICS=true --detach --volume "$(pwd)/data.ms:/data.ms" getmeili/meilisearch:$MEILISEARCH_VERSION
echo "::endgroup::"
return
fi
echo "::group::Starting Meilisearch server"
echo " - port [$MEILISEARCH_PORT]"
echo " - version [$MEILISEARCH_VERSION]"
echo " - api key [$MEILISEARCH_API_KEY]"
echo ""
docker run --name meilisearch --publish $MEILISEARCH_PORT:$MEILISEARCH_PORT -e MEILI_MASTER_KEY="$MEILISEARCH_API_KEY" -e MEILI_NO_ANALYTICS=true --detach --volume "$(pwd)/data.ms:/data.ms" getmeili/meilisearch:$MEILISEARCH_VERSION
echo "::endgroup::"