mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-19 21:07:53 +00:00
Backport non-breaking changes from Release v1.0.0
This commit is contained in:
parent
b92d9900ac
commit
200135164b
@ -14,7 +14,7 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
|
||||
|
||||
|
||||
$DEVILBOX_VERSION = 'v0.15';
|
||||
$DEVILBOX_DATE = '2019-02-27';
|
||||
$DEVILBOX_DATE = '2019-03-01';
|
||||
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
||||
|
||||
//
|
||||
|
@ -114,8 +114,25 @@ class Memcd extends BaseClass implements BaseInterface
|
||||
// Memcached >= 1.5
|
||||
for ($i=0; $i<$cli_retries; $i++) {
|
||||
|
||||
// Get item number to trigger with stats cachedump
|
||||
$output = array();
|
||||
exec('printf "stats cachedump 1 0\nquit\n" | nc memcd 11211 | grep -E \'^ITEM\'', $output);
|
||||
exec('printf "stats items\nquit\n" | nc memcd 11211 | grep -E \'items:[0-9]+:number\s[0-9]+\'', $output);
|
||||
$num1 = 1;
|
||||
$num2 = 0;
|
||||
if (isset($output[0])) {
|
||||
$matches = array();
|
||||
preg_match('/items:([0-9]+):number\s([0-9]+)/', $output[0], $matches);
|
||||
if (isset($matches[1])) {
|
||||
$num1 = $matches[1];
|
||||
}
|
||||
if (isset($matches[2])) {
|
||||
$num2 = $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger stats cachedump on item number
|
||||
$output = array();
|
||||
exec('printf "stats cachedump '.$num1.' '.$num2.' \nquit\n" | nc memcd 11211 | grep -E \'^ITEM\'', $output);
|
||||
foreach ($output as $line) {
|
||||
$matches = array();
|
||||
preg_match('/(^ITEM)\s*(.+?)\s*\[([0-9]+\s*b);\s*([0-9]+\s*s)\s*\]/', $line, $matches);
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -28,9 +28,6 @@
|
||||
# Ignore Certificate Authority
|
||||
/ca/*
|
||||
|
||||
# Ignore emails
|
||||
/mail/*
|
||||
|
||||
# Ignore compose override file
|
||||
/docker-compose.override.yml
|
||||
|
||||
@ -50,7 +47,7 @@
|
||||
/cfg/mysql-5.6/*.cnf
|
||||
/cfg/mysql-5.7/*.cnf
|
||||
/cfg/mysql-8.0/*.cnf
|
||||
/cfg/mariadb-5/*.cnf
|
||||
/cfg/mariadb-5.5/*.cnf
|
||||
/cfg/mariadb-10.0/*.cnf
|
||||
/cfg/mariadb-10.1/*.cnf
|
||||
/cfg/mariadb-10.2/*.cnf
|
||||
|
5
cfg/mariadb-5.5/devilbox-custom.cnf-example
Normal file
5
cfg/mariadb-5.5/devilbox-custom.cnf-example
Normal file
@ -0,0 +1,5 @@
|
||||
[mysqld]
|
||||
;key_buffer_size=16M
|
||||
|
||||
[mysqldump]
|
||||
;quick
|
@ -58,7 +58,7 @@ services:
|
||||
app_net:
|
||||
ipv4_address: 172.16.238.210
|
||||
volumes:
|
||||
- ${HOST_PATH_RABBIT_DATADIR:-./data/rabbit}/${RABBIT_SERVER:-management}:/var/lib/rabbitmq
|
||||
- devilbox-rabbit:/var/lib/rabbitmq
|
||||
depends_on:
|
||||
- bind
|
||||
- php
|
||||
@ -76,7 +76,7 @@ services:
|
||||
app_net:
|
||||
ipv4_address: 172.16.238.220
|
||||
volumes:
|
||||
- data-solr:/opt/solr/server/solr/mycores
|
||||
- devilbox-solr:/opt/solr/server/solr/mycores
|
||||
entrypoint:
|
||||
- docker-entrypoint.sh
|
||||
- solr-precreate
|
||||
@ -150,7 +150,7 @@ services:
|
||||
- TZ=${TIMEZONE:-UTC}
|
||||
- discovery.type=single-node
|
||||
volumes:
|
||||
- data-elastic:/usr/share/elasticsearch/data
|
||||
- devilbox-elastic:/usr/share/elasticsearch/data
|
||||
|
||||
logstash:
|
||||
image: docker.elastic.co/logstash/logstash-oss:${ELK_SERVER:-6.6.1}
|
||||
@ -169,7 +169,7 @@ services:
|
||||
- CONFIG_RELOAD_INTERVAL=300
|
||||
- DB_HOST=DATABASE-SERVER
|
||||
volumes:
|
||||
- data-logstash:/var/lib/logstash
|
||||
- devilbox-logstash:/var/lib/logstash
|
||||
depends_on:
|
||||
- elastic
|
||||
|
||||
@ -192,6 +192,7 @@ services:
|
||||
### Volumes
|
||||
###
|
||||
volumes:
|
||||
data-solr:
|
||||
data-elastic:
|
||||
data-logstash:
|
||||
devilbox-rabbit:
|
||||
devilbox-solr:
|
||||
devilbox-elastic:
|
||||
devilbox-logstash:
|
||||
|
@ -20,7 +20,7 @@ services:
|
||||
- TZ=${TIMEZONE:-UTC}
|
||||
- discovery.type=single-node
|
||||
volumes:
|
||||
- data-elastic:/usr/share/elasticsearch/data
|
||||
- devilbox-elastic:/usr/share/elasticsearch/data
|
||||
|
||||
logstash:
|
||||
image: docker.elastic.co/logstash/logstash-oss:${ELK_SERVER:-6.6.1}
|
||||
@ -39,7 +39,7 @@ services:
|
||||
- CONFIG_RELOAD_INTERVAL=300
|
||||
- DB_HOST=DATABASE-SERVER
|
||||
volumes:
|
||||
- data-logstash:/var/lib/logstash
|
||||
- devilbox-logstash:/var/lib/logstash
|
||||
depends_on:
|
||||
- elastic
|
||||
|
||||
@ -58,5 +58,5 @@ services:
|
||||
- elastic
|
||||
|
||||
volumes:
|
||||
data-elastic:
|
||||
data-logstash:
|
||||
devilbox-elastic:
|
||||
devilbox-logstash:
|
||||
|
@ -20,8 +20,11 @@ services:
|
||||
app_net:
|
||||
ipv4_address: 172.16.238.210
|
||||
volumes:
|
||||
- ${HOST_PATH_RABBIT_DATADIR:-./data/rabbit}/${RABBIT_SERVER:-management}:/var/lib/rabbitmq
|
||||
- devilbox-rabbit:/var/lib/rabbitmq
|
||||
depends_on:
|
||||
- bind
|
||||
- php
|
||||
- httpd
|
||||
|
||||
volumes:
|
||||
devilbox-rabbit:
|
||||
|
@ -15,7 +15,7 @@ services:
|
||||
app_net:
|
||||
ipv4_address: 172.16.238.220
|
||||
volumes:
|
||||
- data-solr:/opt/solr/server/solr/mycores
|
||||
- devilbox-solr:/opt/solr/server/solr/mycores
|
||||
entrypoint:
|
||||
- docker-entrypoint.sh
|
||||
- solr-precreate
|
||||
@ -26,4 +26,4 @@ services:
|
||||
- httpd
|
||||
|
||||
volumes:
|
||||
data-solr:
|
||||
devilbox-solr:
|
||||
|
@ -175,7 +175,7 @@ services:
|
||||
- ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:rw${MOUNT_OPTIONS}
|
||||
|
||||
# Mount Mail directory
|
||||
- ${DEVILBOX_PATH}/mail:/var/mail:rw${MOUNT_OPTIONS}
|
||||
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
|
||||
|
||||
# Mount DB Backup directory
|
||||
- ${DEVILBOX_PATH}/backups:/shared/backups:rw${MOUNT_OPTIONS}
|
||||
@ -503,3 +503,12 @@ networks:
|
||||
config:
|
||||
- subnet: 172.16.238.0/24
|
||||
gateway: 172.16.238.1
|
||||
|
||||
################################################################################
|
||||
# VOLUMES
|
||||
################################################################################
|
||||
volumes:
|
||||
# ------------------------------------------------------------
|
||||
# Misc
|
||||
# ------------------------------------------------------------
|
||||
devilbox-mail:
|
||||
|
@ -31,6 +31,7 @@ See the directory structure for MySQL configuration directories inside ``./cfg/`
|
||||
|
||||
host> ls -l path/to/devilbox/cfg/ | grep -E 'mysql|mariadb|percona'
|
||||
|
||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-5.5/
|
||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.0/
|
||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.1/
|
||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.2/
|
||||
|
@ -46,7 +46,7 @@ must be copied into the root of the Devilbox git directory.
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Container name | ``rabbit`` |
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Mount points | ``./data/rabbit`` (can be changed via ``.env``) |
|
||||
| Mount points | via Docker volumes |
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Exposed port | ``5672`` and ``15672`` (can be changed via ``.env``) |
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
@ -69,8 +69,6 @@ Additionally the following ``.env`` variables can be created for easy configurat
|
||||
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||
| ``RABBIT_SERVER`` | ``management`` | Controls the RabbitMQ version to use. |
|
||||
+------------------------------+-------------------+----------------------------------------------------------------------------+
|
||||
| ``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_USER`` | ``guest`` | Default username for Admin WebUI. |
|
||||
@ -80,7 +78,6 @@ Additionally the following ``.env`` variables can be created for easy configurat
|
||||
|
||||
|
||||
|
||||
|
||||
Instructions
|
||||
============
|
||||
|
||||
@ -125,7 +122,6 @@ Add the following variables to ``.env`` and adjust them to your needs:
|
||||
|
||||
HOST_PORT_RABBIT=5672
|
||||
HOST_PORT_RABBIT_MGMT=15672
|
||||
HOST_PATH_RABBIT_DATADIR=./data/rabbit
|
||||
|
||||
.. seealso:: :ref:`env_file`
|
||||
|
||||
@ -169,7 +165,6 @@ directory:
|
||||
echo "RABBIT_DEFAULT_PASS=guest" >> .env
|
||||
echo "HOST_PORT_RABBIT=5672" >> .env
|
||||
echo "HOST_PORT_RABBIT_MGMT=15672" >> .env
|
||||
echo "HOST_PATH_RABBIT_DATADIR=./data/rabbit" >> .env
|
||||
|
||||
# Start container
|
||||
docker-compose up -d php httpd bind rabbit
|
||||
|
@ -46,7 +46,7 @@ must be copied into the root of the Devilbox git directory.
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Container name | ``solr`` |
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Mount points | none |
|
||||
| Mount points | via Docker volumes |
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Exposed port | ``8983`` (can be changed via ``.env``) |
|
||||
+-----------------------+------------------------------------------------------------------------------------------------------+
|
||||
|
Loading…
Reference in New Issue
Block a user