mirror of
https://github.com/cytopia/devilbox.git
synced 2025-02-21 09:51:49 +00:00
Merge pull request #910 from minhchu/support-meilisearch
Add support for meilisearch
This commit is contained in:
commit
2828e837d9
@ -243,6 +243,26 @@ services:
|
|||||||
- bind
|
- bind
|
||||||
- httpd
|
- httpd
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------
|
||||||
|
# Meilisearch
|
||||||
|
# -----------------------------------------------------------------------------------------------
|
||||||
|
meilisearch:
|
||||||
|
image: getmeili/meilisearch:${MEILI_SERVER:-latest}
|
||||||
|
hostname: meilisearch
|
||||||
|
command: meilisearch
|
||||||
|
environment:
|
||||||
|
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY-""}
|
||||||
|
ports:
|
||||||
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEILI:-7700}:7700"
|
||||||
|
networks:
|
||||||
|
app_net:
|
||||||
|
ipv4_address: 172.16.238.203
|
||||||
|
volumes:
|
||||||
|
- devilbox-meilisearch:/meili_data
|
||||||
|
depends_on:
|
||||||
|
- bind
|
||||||
|
- php
|
||||||
|
- httpd
|
||||||
|
|
||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
@ -252,3 +272,4 @@ volumes:
|
|||||||
devilbox-solr:
|
devilbox-solr:
|
||||||
devilbox-elastic:
|
devilbox-elastic:
|
||||||
devilbox-logstash:
|
devilbox-logstash:
|
||||||
|
devilbox-meilisearch:
|
||||||
|
29
compose/docker-compose.override.yml-meilisearch
Normal file
29
compose/docker-compose.override.yml-meilisearch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# vim: set ft=yaml:
|
||||||
|
---
|
||||||
|
version: '2.3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------------------------
|
||||||
|
# Meilisearch
|
||||||
|
# -----------------------------------------------------------------------------------------------
|
||||||
|
meilisearch:
|
||||||
|
image: getmeili/meilisearch:${MEILI_SERVER:-latest}
|
||||||
|
hostname: meilisearch
|
||||||
|
command: meilisearch
|
||||||
|
environment:
|
||||||
|
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY-""}
|
||||||
|
ports:
|
||||||
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEILI:-7700}:7700"
|
||||||
|
networks:
|
||||||
|
app_net:
|
||||||
|
ipv4_address: 172.16.238.203
|
||||||
|
volumes:
|
||||||
|
- devilbox-meilisearch:/meili_data
|
||||||
|
depends_on:
|
||||||
|
- bind
|
||||||
|
- php
|
||||||
|
- httpd
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
devilbox-meilisearch:
|
@ -135,3 +135,16 @@
|
|||||||
<a target="_blank" href="https://github.com/elastic/kibana">
|
<a target="_blank" href="https://github.com/elastic/kibana">
|
||||||
GitHub: Kibana <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
GitHub: Kibana <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
.. |ext_lnk_meilisearch_github| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://github.com/meilisearch/meilisearch">
|
||||||
|
Github: Meilisearch <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
.. |ext_lnk_meilisearch_dockerhub| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://hub.docker.com/r/getmeili/meilisearch">
|
||||||
|
Dockerhub: Meilisearch <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ However, each example also exists in its standalone file as shown below:
|
|||||||
├── docker-compose.override.yml-blackfire
|
├── docker-compose.override.yml-blackfire
|
||||||
├── docker-compose.override.yml-elk
|
├── docker-compose.override.yml-elk
|
||||||
├── docker-compose.override.yml-mailhog
|
├── docker-compose.override.yml-mailhog
|
||||||
|
├── docker-compose.override.yml-meilisearch
|
||||||
├── docker-compose.override.yml-ngrok
|
├── docker-compose.override.yml-ngrok
|
||||||
├── docker-compose.override.yml-php-community
|
├── docker-compose.override.yml-php-community
|
||||||
├── docker-compose.override.yml-python-flask
|
├── docker-compose.override.yml-python-flask
|
||||||
|
153
docs/custom-container/enable-meilisearch.rst
Normal file
153
docs/custom-container/enable-meilisearch.rst
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
.. include:: /_includes/all.rst
|
||||||
|
.. include:: /_includes/snippets/__ANNOUNCEMENTS__.rst
|
||||||
|
|
||||||
|
.. _custom_container_enable_meilisearch:
|
||||||
|
|
||||||
|
********************************
|
||||||
|
Enable and configure Meilisearch
|
||||||
|
********************************
|
||||||
|
|
||||||
|
This section will guide you through getting Meilisearch integrated into the Devilbox.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
* |ext_lnk_meilisearch_github|
|
||||||
|
* |ext_lnk_meilisearch_dockerhub|
|
||||||
|
* :ref:`custom_container_enable_all_additional_container`
|
||||||
|
* :ref:`docker_compose_override_yml_how_does_it_work`
|
||||||
|
|
||||||
|
|
||||||
|
**Table of Contents**
|
||||||
|
|
||||||
|
.. contents:: :local:
|
||||||
|
|
||||||
|
|
||||||
|
Overview
|
||||||
|
========
|
||||||
|
|
||||||
|
Available overwrites
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
.. include:: /_includes/snippets/docker-compose-override-tree-view.rst
|
||||||
|
|
||||||
|
|
||||||
|
Meilisearch settings
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
In case of Meilisearch, the file is ``compose/docker-compose.override.yml-meilisearch``. This file
|
||||||
|
must be copied into the root of the Devilbox git directory.
|
||||||
|
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| What | How and where |
|
||||||
|
+=======================+========================================================================================================+
|
||||||
|
| Example compose file | ``compose/docker-compose.override.yml-all`` or |br| ``compose/docker-compose.override.yml-meilisearch``|
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Container IP address | ``172.16.238.203`` |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Container host name | ``meilisearch`` |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Container name | ``meilisearch`` |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Mount points | via Docker volumes |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Exposed port | ``7700`` (can be changed via ``.env``) |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Available at | ``http://localhost:7700`` (API and Admin WebUI) |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
| Further configuration | none |
|
||||||
|
+-----------------------+--------------------------------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
Meilisearch env variables
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Additionally the following ``.env`` variables can be created for easy configuration:
|
||||||
|
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------------+
|
||||||
|
| Variable | Default value | Description |
|
||||||
|
+==============================+===================+==================================================================================+
|
||||||
|
| ``HOST_PORT_MEILI`` | ``7700`` | Controls the host port on which Meilisearch API and WebUI will be available at. |
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------------+
|
||||||
|
| ``MEILI_SERVER`` | ``latest`` | Controls the Meilisearch version to use. |
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------------+
|
||||||
|
| ``MEILI_MASTER_KEY`` | none | Default Meilisearch master key. |
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
Instructions
|
||||||
|
============
|
||||||
|
|
||||||
|
1. Copy docker-compose.override.yml
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Copy the Meilisearch Docker Compose overwrite file into the root of the Devilbox git directory.
|
||||||
|
(It must be at the same level as the default ``docker-compose.yml`` file).
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
host> cp compose/docker-compose.override.yml-meilisearch docker-compose.override.yml
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
* :ref:`docker_compose_override_yml`
|
||||||
|
* :ref:`add_your_own_docker_image`
|
||||||
|
* :ref:`overwrite_existing_docker_image`
|
||||||
|
|
||||||
|
|
||||||
|
2. Adjust ``.env`` settings (optional)
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Meilisearch is using sane defaults, which can be changed by adding variables to the ``.env`` file
|
||||||
|
and assigning custom values.
|
||||||
|
|
||||||
|
Add the following variables to ``.env`` and adjust them to your needs:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:caption: .env
|
||||||
|
|
||||||
|
# Meilisearch version to choose
|
||||||
|
#MEILI_SERVER=v0.26.0
|
||||||
|
#MEILI_SERVER=v0.27.0
|
||||||
|
#MEILI_SERVER=v0.28
|
||||||
|
MEILI_SERVER=latest
|
||||||
|
|
||||||
|
MEILI_MASTER_KEY=
|
||||||
|
HOST_PORT_MEILI=7700
|
||||||
|
|
||||||
|
.. seealso:: :ref:`env_file`
|
||||||
|
|
||||||
|
|
||||||
|
3. Start the Devilbox
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The final step is to start the Devilbox with Meilisearch.
|
||||||
|
|
||||||
|
Let's assume you want to start ``php``, ``httpd``, ``bind``, ``meilisearch``.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
host> docker-compose up -d php httpd bind meilisearch
|
||||||
|
|
||||||
|
.. seealso:: :ref:`start_the_devilbox`
|
||||||
|
|
||||||
|
|
||||||
|
TL;DR
|
||||||
|
=====
|
||||||
|
|
||||||
|
For the lazy readers, here are all commands required to get you started.
|
||||||
|
Simply copy and paste the following block into your terminal from the root of your Devilbox git
|
||||||
|
directory:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Copy compose-override.yml into place
|
||||||
|
cp compose/docker-compose.override.yml-meilisearch docker-compose.override.yml
|
||||||
|
|
||||||
|
# Create .env variable
|
||||||
|
echo "# Meilisearch version to choose" >> .env
|
||||||
|
echo "#MEILI_SERVER=v0.26.0" >> .env
|
||||||
|
echo "#MEILI_SERVER=v0.27.0" >> .env
|
||||||
|
echo "#MEILI_SERVER=v0.28" >> .env
|
||||||
|
echo "MEILI_SERVER=latest" >> .env
|
||||||
|
echo "MEILI_MASTER_KEY=" >> .env
|
||||||
|
echo "HOST_PORT_MEILI=7700" >> .env
|
||||||
|
|
||||||
|
# Start container
|
||||||
|
docker-compose up -d php httpd bind meilisearch
|
@ -122,6 +122,7 @@ host is ready to be served with your custom domain.
|
|||||||
custom-container/enable-blackfire
|
custom-container/enable-blackfire
|
||||||
custom-container/enable-elk-stack
|
custom-container/enable-elk-stack
|
||||||
custom-container/enable-mailhog
|
custom-container/enable-mailhog
|
||||||
|
custom-container/enable-meilisearch
|
||||||
custom-container/enable-ngrok
|
custom-container/enable-ngrok
|
||||||
custom-container/enable-python-flask
|
custom-container/enable-python-flask
|
||||||
custom-container/enable-rabbitmq
|
custom-container/enable-rabbitmq
|
||||||
|
Loading…
x
Reference in New Issue
Block a user