mirror of https://github.com/perkeep/perkeep.git
Fix dev-indexer; make it use a config file.
This commit is contained in:
parent
12b8190828
commit
9f486934f5
|
@ -0,0 +1,17 @@
|
|||
{ "_for-emacs": "-*- mode: js2;-*-",
|
||||
"baseURL": ["_env", "http://localhost:${CAMLI_PORT}"],
|
||||
"password": ["_env", "${CAMLI_PASSWORD}"],
|
||||
"prefixes": {
|
||||
"/indexer/": {
|
||||
"handler": "mysqlindexer",
|
||||
"handlerArgs": {
|
||||
"database": "devcamlistore",
|
||||
"user": "root",
|
||||
"password": "root",
|
||||
"host": "127.0.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use FindBin;
|
||||
use FindBin qw($Bin);
|
||||
use Getopt::Long;
|
||||
use DBI;
|
||||
|
||||
|
@ -28,6 +28,7 @@ unless (-d $root) {
|
|||
system("mkdir", "-p", $root) and die "Failed to create $root.\n";
|
||||
}
|
||||
|
||||
|
||||
my $DBNAME = "devcamlistore";
|
||||
|
||||
my $dbh = DBI->connect("DBI:mysql:database=mysql", "root", "root") or
|
||||
|
@ -78,11 +79,11 @@ if ($opt_wipe) {
|
|||
")");
|
||||
}
|
||||
|
||||
print "Starting indexer with indexer on http://localhost:$port/ in $root\n";
|
||||
print "Starting indexer with indexer on http://localhost:$port/indexer/\n";
|
||||
|
||||
$ENV{CAMLI_PASSWORD} = "pass$port";
|
||||
$ENV{CAMLI_PORT} = $port;
|
||||
exec("$FindBin::Bin/server/go/camlistored/camlistored",
|
||||
"-root=$root", # NOTE: Root required but not used by indexer blobserver
|
||||
"-configfile=$Bin/config/dev-indexer-config.json",
|
||||
"-listen=:$port",
|
||||
"-devmysqlindexer",
|
||||
@ARGV);
|
||||
|
|
Loading…
Reference in New Issue