Commit e773ef9 1 parent 8e5d3c0 commit e773ef9 Copy full SHA for e773ef9
File tree 2 files changed +32
-1
lines changed
2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 76
76
77
77
env . MEILI_DB_PATH = config . env . DEVENV_STATE + "/meilisearch" ;
78
78
env . MEILI_HTTP_ADDR = "${ cfg . listenAddress } :${ toString cfg . listenPort } " ;
79
- env . MEILI_NO_ANALYTICS = toString cfg . noAnalytics ;
79
+ env . MEILI_NO_ANALYTICS = lib . boolToString cfg . noAnalytics ;
80
80
env . MEILI_ENV = cfg . environment ;
81
81
env . MEILI_DUMP_DIR = config . env . MEILI_DB_PATH + "/dumps" ;
82
82
env . MEILI_LOG_LEVEL = cfg . logLevel ;
Original file line number Diff line number Diff line change
1
+ { pkgs , ... } :
2
+ let
3
+ port = 7700 ;
4
+ in
5
+ {
6
+
7
+ config = {
8
+ services . meilisearch = {
9
+ enable = true ;
10
+ listenPort = port ;
11
+ noAnalytics = true ;
12
+ listenAddress = "127.0.0.1" ;
13
+ } ;
14
+
15
+ scripts . meilisearch-healthcheck . exec = ''
16
+ RUNNING=$(${ pkgs . curl } /bin/curl -s 127.0.0.1:${ toString port } /health | grep "available")
17
+
18
+ if [[ -z "$RUNNING" ]]; then
19
+ exit 1
20
+ else
21
+ exit 0
22
+ fi
23
+ '' ;
24
+
25
+ enterTest = ''
26
+ wait_for_port ${ toString port }
27
+
28
+ timeout 5 bash -c "until meilisearch-healthcheck; do sleep 1; done"
29
+ '' ;
30
+ } ;
31
+ }
You can’t perform that action at this time.
0 commit comments