Skip to content

Commit

Permalink
Add Typesense service class
Browse files Browse the repository at this point in the history
  • Loading branch information
justindantzer committed Jan 18, 2024
1 parent 844f1f6 commit 9ad1a5a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions app/Services/Typesense.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace App\Services;

class Typesense extends BaseService
{
protected static $category = Category::SEARCH;

protected $organization = 'typesense';
protected $imageName = 'typesense';
protected $defaultPort = 8108;
protected $prompts = [
[
'shortname' => 'volume',
'prompt' => 'What is the Docker volume name?',
'default' => 'typesense_data',
],
[
'shortname' => 'admin_key',
'prompt' => 'What will the admin API key be?',
'default' => 'typesenseadmin',
],
];

protected $dockerRunTemplate = '-p "${:port}":8108 \
-v "${:volume}":/data \
"${:organization}"/"${:image_name}":"${:tag}" \
--data-dir /data \
--api-key="${:admin_key}"';

protected static $displayName = 'Typesense';
}

0 comments on commit 9ad1a5a

Please sign in to comment.