mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-24 15:06:41 +00:00
Merge pull request #357 from cytopia/docker-solr
Adding new container: Solr
This commit is contained in:
commit
085b96cae7
@ -14,7 +14,7 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
|
|||||||
|
|
||||||
|
|
||||||
$DEVILBOX_VERSION = 'v0.15';
|
$DEVILBOX_VERSION = 'v0.15';
|
||||||
$DEVILBOX_DATE = '2018-08-15';
|
$DEVILBOX_DATE = '2018-08-18';
|
||||||
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
||||||
|
|
||||||
//
|
//
|
||||||
|
36
README.md
36
README.md
@ -5,6 +5,7 @@
|
|||||||
![Devilbox](docs/img/banner.png)
|
![Devilbox](docs/img/banner.png)
|
||||||
|
|
||||||
**[Usage](#usage)** |
|
**[Usage](#usage)** |
|
||||||
|
**[Available Container](#available-container)** |
|
||||||
**[Community](#community)** |
|
**[Community](#community)** |
|
||||||
**[Features](#feature-overview)** |
|
**[Features](#feature-overview)** |
|
||||||
**[Intranet](#intranet-overview)** |
|
**[Intranet](#intranet-overview)** |
|
||||||
@ -39,6 +40,22 @@ Furthermore, the Devilbox provides an **identical** and **reproducable developme
|
|||||||
* [Docker Compose 1.9.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21)
|
* [Docker Compose 1.9.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21)
|
||||||
|
|
||||||
|
|
||||||
|
## Available Container
|
||||||
|
|
||||||
|
The Devilbox ships the following pre-configured Docker container in any available version.
|
||||||
|
|
||||||
|
| Web server | SQL | NoSQL | Queue & Search | Misc |
|
||||||
|
|------------|------------|-----------|----------------|---------|
|
||||||
|
| Apache | MariaDB | Memcached | RabbitMQ | Bind |
|
||||||
|
| Nginx | MySQL | MongoDB | Solr | MailHog |
|
||||||
|
| | PerconaDB | Redis | | PHP |
|
||||||
|
| | PostgreSQL | | | |
|
||||||
|
|
||||||
|
> **Documentation:**
|
||||||
|
> [Available Container](https://devilbox.readthedocs.io/en/latest/readings/available-container.html)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
Find documentation and help here
|
Find documentation and help here
|
||||||
@ -278,20 +295,29 @@ Additionally to the default stack, there are a variety of other services that ca
|
|||||||
<tr>
|
<tr>
|
||||||
<th>MailHog</th>
|
<th>MailHog</th>
|
||||||
<th>RabbitMQ</th>
|
<th>RabbitMQ</th>
|
||||||
|
<th>Solr</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>v1.0.0</td>
|
<td><a target="_blank" title="MailHog v1.0.0" href="https://github.com/mailhog/MailHog">v1.0.0</a></td>
|
||||||
<td>3.6</td>
|
<td><a target="_blank" title="RabbitMQ 3.6" href="https://github.com/rabbitmq/rabbitmq-server">3.6</a></td>
|
||||||
|
<td><a target="_blank" title="Solr 5" href="https://github.com/apache/lucene-solr">5</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>latest</td>
|
<td><a target="_blank" title="MailHog latest" href="https://github.com/mailhog/MailHog">latest</a></td>
|
||||||
<td>3.7</td>
|
<td><a target="_blank" title="RabbitMQ 3.7" href="https://github.com/rabbitmq/rabbitmq-server">3.7</a></td>
|
||||||
|
<td><a target="_blank" title="Solr 6" href="https://github.com/apache/lucene-solr">6</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>latest</td>
|
<td><a target="_blank" title="RabbitMQ latest" href="https://github.com/rabbitmq/rabbitmq-server">latest</a></td>
|
||||||
|
<td><a target="_blank" title="Solr 7" href="https://github.com/apache/lucene-solr">7</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><a target="_blank" title="Solr latest" href="https://github.com/apache/lucene-solr">latest</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -34,3 +34,25 @@ services:
|
|||||||
- bind
|
- bind
|
||||||
- php
|
- php
|
||||||
- httpd
|
- httpd
|
||||||
|
|
||||||
|
solr:
|
||||||
|
image: solr:${SOLR_SERVER:-latest}
|
||||||
|
hostname: solr
|
||||||
|
ports:
|
||||||
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_SOLR:-8983}:8983"
|
||||||
|
networks:
|
||||||
|
app_net:
|
||||||
|
ipv4_address: 172.16.238.220
|
||||||
|
volumes:
|
||||||
|
- data-solr:/opt/solr/server/solr/mycores
|
||||||
|
entrypoint:
|
||||||
|
- docker-entrypoint.sh
|
||||||
|
- solr-precreate
|
||||||
|
- ${SOLR_CORE_NAME:-devilbox}
|
||||||
|
depends_on:
|
||||||
|
- bind
|
||||||
|
- php
|
||||||
|
- httpd
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data-solr:
|
||||||
|
24
compose/docker-compose.override.yml-solr
Normal file
24
compose/docker-compose.override.yml-solr
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
version: '2.1'
|
||||||
|
|
||||||
|
services:
|
||||||
|
solr:
|
||||||
|
image: solr:${SOLR_SERVER:-latest}
|
||||||
|
hostname: solr
|
||||||
|
ports:
|
||||||
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_SOLR:-8983}:8983"
|
||||||
|
networks:
|
||||||
|
app_net:
|
||||||
|
ipv4_address: 172.16.238.220
|
||||||
|
volumes:
|
||||||
|
- data-solr:/opt/solr/server/solr/mycores
|
||||||
|
entrypoint:
|
||||||
|
- docker-entrypoint.sh
|
||||||
|
- solr-precreate
|
||||||
|
- ${SOLR_CORE_NAME:-devilbox}
|
||||||
|
depends_on:
|
||||||
|
- bind
|
||||||
|
- php
|
||||||
|
- httpd
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data-solr:
|
@ -51,3 +51,15 @@
|
|||||||
<a target="_blank" href="https://hub.docker.com/_/rabbitmq/">
|
<a target="_blank" href="https://hub.docker.com/_/rabbitmq/">
|
||||||
Dockerhub: RabbitMQ <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
Dockerhub: RabbitMQ <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
.. |ext_lnk_solr_github| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://github.com/apache/lucene-solr">
|
||||||
|
Github: Solr <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
.. |ext_lnk_solr_dockerhub| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://hub.docker.com/_/solr/">
|
||||||
|
Dockerhub: Solr <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
@ -5,3 +5,5 @@
|
|||||||
+---------------------------+----------+----------+----------------+
|
+---------------------------+----------+----------+----------------+
|
||||||
| RabbitMQ | rabbit | rabbit | 172.16.238.210 |
|
| RabbitMQ | rabbit | rabbit | 172.16.238.210 |
|
||||||
+---------------------------+----------+----------+----------------+
|
+---------------------------+----------+----------+----------------+
|
||||||
|
| Solr | solr | solr | 172.16.238.220 |
|
||||||
|
+---------------------------+----------+----------+----------------+
|
||||||
|
@ -11,8 +11,9 @@ However, each example also exists in its standalone file as shown below:
|
|||||||
├── docker-compose.override.yml-all
|
├── docker-compose.override.yml-all
|
||||||
├── docker-compose.override.yml-mailhog
|
├── docker-compose.override.yml-mailhog
|
||||||
├── docker-compose.override.yml-rabbitmq
|
├── docker-compose.override.yml-rabbitmq
|
||||||
|
├── docker-compose.override.yml-solr
|
||||||
└── README.md
|
└── README.md
|
||||||
|
|
||||||
0 directories, 4 files
|
0 directories, 5 files
|
||||||
|
|
||||||
.. seealso:: :ref:`custom_container_enable_all_additional_container`
|
.. seealso:: :ref:`custom_container_enable_all_additional_container`
|
||||||
|
@ -55,3 +55,4 @@ In order to fully customize each container, refer to their own documentation sec
|
|||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`custom_container_enable_mailhog`
|
* :ref:`custom_container_enable_mailhog`
|
||||||
* :ref:`custom_container_enable_rabbitmq`
|
* :ref:`custom_container_enable_rabbitmq`
|
||||||
|
* :ref:`custom_container_enable_solr`
|
||||||
|
@ -70,7 +70,7 @@ Additionally the following ``.env`` variables can be created for easy configurat
|
|||||||
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
| ``HOST_PATH_RABBIT_DATADIR`` | ``./data/rabbit`` | Default mount point for persistent data. |
|
| ``HOST_PATH_RABBIT_DATADIR`` | ``./data/rabbit`` | Default mount point for persistent data. |
|
||||||
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
| ``rabbit_default_vhost`` | ``my_vhost`` | Default RabbitMQ vhost name. (not a webserver vhost name) |
|
| ``RABBIT_DEFAULT_VHOST`` | ``my_vhost`` | Default RabbitMQ vhost name. (not a webserver vhost name) |
|
||||||
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
| ``RABBIT_DEFAULT_USER`` | ``guest`` | Default username for Admin WebUI. |
|
| ``RABBIT_DEFAULT_USER`` | ``guest`` | Default username for Admin WebUI. |
|
||||||
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
|
151
docs/custom-container/enable-solr.rst
Normal file
151
docs/custom-container/enable-solr.rst
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
.. include:: /_includes/all.rst
|
||||||
|
|
||||||
|
.. _custom_container_enable_solr:
|
||||||
|
|
||||||
|
*************************
|
||||||
|
Enable and configure Solr
|
||||||
|
*************************
|
||||||
|
|
||||||
|
This section will guide you through getting Solr integrated into the Devilbox.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
* |ext_lnk_solr_github|
|
||||||
|
* |ext_lnk_solr_dockerhub|
|
||||||
|
* :ref:`custom_container_enable_all_additional_container`
|
||||||
|
|
||||||
|
|
||||||
|
**Table of Contents**
|
||||||
|
|
||||||
|
.. contents:: :local:
|
||||||
|
|
||||||
|
|
||||||
|
Overview
|
||||||
|
========
|
||||||
|
|
||||||
|
Available overwrites
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
.. include:: /_includes/snippets/docker-compose-override-tree-view.rst
|
||||||
|
|
||||||
|
|
||||||
|
Solr settings
|
||||||
|
-------------
|
||||||
|
|
||||||
|
In case of Solr, the file is ``compose/docker-compose.override.yml-solr``. 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-solr`` |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Container IP address | ``172.16.238.220`` |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Container host name | ``solr`` |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Container name | ``solr`` |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Mount points | none |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Exposed port | ``8983`` (can be changed via ``.env``) |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Available at | ``http://localhost:8983`` (API and Admin WebUI) |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
| Further configuration | none |
|
||||||
|
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
Solr env variables
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Additionally the following ``.env`` variables can be created for easy configuration:
|
||||||
|
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
|
| Variable | Default value | Description |
|
||||||
|
+==============================+===================+============================================================================+
|
||||||
|
| ``HOST_PORT_SOLR`` | ``8983`` | Controls the host port on which Solr API and WebUIwill be available at. |
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
|
| ``SOLR_SERVER`` | ``latest`` | Controls the Solr version to use. |
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
|
| ``SOLR_CORE_NAME`` | ``devilbox`` | Default Solr core name |
|
||||||
|
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
Instructions
|
||||||
|
============
|
||||||
|
|
||||||
|
1. Copy docker-compose.override.yml
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Copy the Solr 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-solr 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)
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Solr 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
|
||||||
|
|
||||||
|
# Solr version to choose
|
||||||
|
#SOLR_SERVER=5
|
||||||
|
#SOLR_SERVER=6
|
||||||
|
#SOLR_SERVER=7
|
||||||
|
SOLR_SERVER=latest
|
||||||
|
|
||||||
|
SOLR_CORE_NAME=devilbox
|
||||||
|
HOST_PORT_SOLR=8983
|
||||||
|
|
||||||
|
.. seealso:: :ref:`env_file`
|
||||||
|
|
||||||
|
|
||||||
|
4. Start the Devilbox
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The final step is to start the Devilbox with Solr.
|
||||||
|
|
||||||
|
Let's assume you want to start ``php``, ``httpd``, ``bind``, ``solr``.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
host> docker-compose up -d php httpd bind solr
|
||||||
|
|
||||||
|
.. 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-solr docker-compose.override.yml
|
||||||
|
|
||||||
|
# Create .env variable
|
||||||
|
echo "# Solr version to choose" >> .env
|
||||||
|
echo "#SOLR_SERVER=5" >> .env
|
||||||
|
echo "#SOLR_SERVER=6" >> .env
|
||||||
|
echo "#SOLR_SERVER=7" >> .env
|
||||||
|
echo "SOLR_SERVER=latest" >> .env
|
||||||
|
echo "SOLR_CORE_NAME=devilbox" >> .env
|
||||||
|
echo "HOST_PORT_SOLR=8983" >> .env
|
||||||
|
|
||||||
|
# Start container
|
||||||
|
docker-compose up -d php httpd bind solr
|
@ -96,6 +96,7 @@ host is ready to be served with your custom domain.
|
|||||||
custom-container/enable-all-container
|
custom-container/enable-all-container
|
||||||
custom-container/enable-mailhog
|
custom-container/enable-mailhog
|
||||||
custom-container/enable-rabbitmq
|
custom-container/enable-rabbitmq
|
||||||
|
custom-container/enable-solr
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
Loading…
Reference in New Issue
Block a user