From ba3dd317291e67ebe7b9577bf88dff30a7216f9b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 22 Sep 2018 12:12:11 +0200 Subject: [PATCH 01/11] Refs #175, Refs #382 Use Docker volumes instead of data directories --- docker-compose.yml | 51 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 449be04f..253c4f5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -362,7 +362,7 @@ services: - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} # Mount MySQL Data directory - - ${HOST_PATH_MYSQL_DATADIR}/${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS} + - devilbox-${MYSQL_SERVER:-mariadb-10.1}:/var/lib/mysql:rw${MOUNT_OPTIONS} depends_on: - bind @@ -399,7 +399,7 @@ services: - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER}:/var/log/postgresql:rw${MOUNT_OPTIONS} # Mount PostgreSQL Data directory - - ${HOST_PATH_PGSQL_DATADIR}/${PGSQL_SERVER}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} + - devilbox-pgsql-${PGSQL_SERVER:-9.6}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} depends_on: - bind @@ -488,7 +488,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount MongoDB Data directory - - ${HOST_PATH_MONGO_DATADIR}/${MONGO_SERVER}:/data/db:rw${MOUNT_OPTIONS} + - devilbox-mongo-${MONGO_SERVER:-latest}:/data/db:rw${MOUNT_OPTIONS} depends_on: - bind @@ -518,3 +518,48 @@ volumes: # Misc # ------------------------------------------------------------ devilbox-mail: + + # MySQL + # ------------------------------------------------------------ + devilbox-mysql-5.5: + devilbox-mysql-5.6: + devilbox-mysql-5.7: + devilbox-mysql-8.0: + devilbox-mariadb-5.5: + devilbox-mariadb-10.0: + devilbox-mariadb-10.1: + devilbox-mariadb-10.2: + devilbox-mariadb-10.3: + devilbox-percona-5.5: + devilbox-percona-5.6: + devilbox-percona-5.7: + + # ------------------------------------------------------------ + # Postgres + # ------------------------------------------------------------ + devilbox-pgsql-9.1: + devilbox-pgsql-9.2: + devilbox-pgsql-9.3: + devilbox-pgsql-9.4: + devilbox-pgsql-9.5: + devilbox-pgsql-9.6: + devilbox-pgsql-10.0: + devilbox-pgsql-10.1: + devilbox-pgsql-10.2: + devilbox-pgsql-10.3: + devilbox-pgsql-10.4: + devilbox-pgsql-10.5: + + # ------------------------------------------------------------ + # MongoDB + # ------------------------------------------------------------ + devilbox-mongo-2.8: + devilbox-mongo-3.0: + devilbox-mongo-3.2: + devilbox-mongo-3.4: + devilbox-mongo-3.5: + devilbox-mongo-3.6: + devilbox-mongo-3.7: + devilbox-mongo-4.0: + devilbox-mongo-4.1: + devilbox-mongo-latest: From bb1b72d9af5565ecf93fe10f144211288f64c211 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 22 Sep 2018 12:13:25 +0200 Subject: [PATCH 02/11] Ensure default values are used for mounted data directories as well --- docker-compose.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 253c4f5f..5d1873f8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -172,7 +172,7 @@ services: - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} # Mount logs - - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER:-7.0}:/var/log/php:rw${MOUNT_OPTIONS} # Mount Mail directory - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} @@ -182,15 +182,15 @@ services: # Mount devilbox user-defined *.ini files in order # to overwrite the default PHP.ini configuration - - ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER}:/etc/php-custom.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER:-7.0}:/etc/php-custom.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined PHP-FPM *.conf files in order # to overwrite the default PHP-FPM configuration - - ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER:-7.0}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined *.so files in order # to load custom PHP modules - - ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER:-7.0}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS} # Mount devilbox user-defined PHP-FPM startup *.sh scripts - ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.1.d:rw${MOUNT_OPTIONS} @@ -289,13 +289,13 @@ services: - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} # Mount custom web server config directory - - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER:-nginx-stable}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS} # Mount custom vhost-templates - ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d:rw${MOUNT_OPTIONS} # Mount logs - - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/${HTTPD_SERVER:-nginx-stable}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS} # Certificate Authority public key - ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS} @@ -352,14 +352,14 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/${MYSQL_SERVER:-mariadb-10.1}:/var/log/mysql:rw${MOUNT_OPTIONS} # Mount devilbox default overwrites - - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER:-mariadb-10.1}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined cnf files in order # to overwrite the MySQL server configuration - - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER:-mariadb-10.1}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} # Mount MySQL Data directory - devilbox-${MYSQL_SERVER:-mariadb-10.1}:/var/lib/mysql:rw${MOUNT_OPTIONS} @@ -396,7 +396,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER}:/var/log/postgresql:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER:-9.6}:/var/log/postgresql:rw${MOUNT_OPTIONS} # Mount PostgreSQL Data directory - devilbox-pgsql-${PGSQL_SERVER:-9.6}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} @@ -460,7 +460,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/memcd-${MEMCD_SERVER}:/var/log/memcd:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/memcd-${MEMCD_SERVER:-latest}:/var/log/memcd:rw${MOUNT_OPTIONS} depends_on: - bind From c6542ad032cb03df6edd374e52f7d3b3905dde9f Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 22 Sep 2018 12:43:49 +0200 Subject: [PATCH 03/11] Update container versions --- README.md | 5 ++--- docker-compose.yml | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d7bb52c6..0acf7262 100644 --- a/README.md +++ b/README.md @@ -303,8 +303,7 @@ Every single attachable container comes with many different versions. In order t ... - - + 4.0 @@ -328,7 +327,7 @@ Every single attachable container comes with many different versions. In order t latest - + latest diff --git a/docker-compose.yml b/docker-compose.yml index 5d1873f8..e6208388 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -352,17 +352,17 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/${MYSQL_SERVER:-mariadb-10.1}:/var/log/mysql:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/${MYSQL_SERVER:-mariadb-10.3}:/var/log/mysql:rw${MOUNT_OPTIONS} # Mount devilbox default overwrites - - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER:-mariadb-10.1}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER:-mariadb-10.3}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined cnf files in order # to overwrite the MySQL server configuration - - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER:-mariadb-10.1}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER:-mariadb-10.3}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} # Mount MySQL Data directory - - devilbox-${MYSQL_SERVER:-mariadb-10.1}:/var/lib/mysql:rw${MOUNT_OPTIONS} + - devilbox-${MYSQL_SERVER:-mariadb-10.3}:/var/lib/mysql:rw${MOUNT_OPTIONS} depends_on: - bind @@ -396,10 +396,10 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER:-9.6}:/var/log/postgresql:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER:-latest}:/var/log/postgresql:rw${MOUNT_OPTIONS} # Mount PostgreSQL Data directory - - devilbox-pgsql-${PGSQL_SERVER:-9.6}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} + - devilbox-pgsql-${PGSQL_SERVER:-latest}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} depends_on: - bind @@ -432,7 +432,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER}:/var/log/redis:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER:-latest}:/var/log/redis:rw${MOUNT_OPTIONS} depends_on: - bind @@ -537,6 +537,7 @@ volumes: # ------------------------------------------------------------ # Postgres # ------------------------------------------------------------ + devilbox-pgsql-9.0: devilbox-pgsql-9.1: devilbox-pgsql-9.2: devilbox-pgsql-9.3: @@ -549,17 +550,18 @@ volumes: devilbox-pgsql-10.3: devilbox-pgsql-10.4: devilbox-pgsql-10.5: + devilbox-pgsql-latest: # ------------------------------------------------------------ # MongoDB # ------------------------------------------------------------ + devilbox-mongo-2.2: + devilbox-mongo-2.4: + devilbox-mongo-2.6: devilbox-mongo-2.8: devilbox-mongo-3.0: devilbox-mongo-3.2: devilbox-mongo-3.4: - devilbox-mongo-3.5: devilbox-mongo-3.6: - devilbox-mongo-3.7: devilbox-mongo-4.0: - devilbox-mongo-4.1: devilbox-mongo-latest: From c58216395128397cb8ca97c6d330dfc9e7e4f928 Mon Sep 17 00:00:00 2001 From: cytopia Date: Wed, 10 Oct 2018 09:32:40 +0200 Subject: [PATCH 04/11] Remove unecessary data dirs --- .gitignore | 4 ---- data/mysql/.keepme | 0 data/pgsql/.keepme | 0 data/rabbit/.keepme | 0 4 files changed, 4 deletions(-) delete mode 100644 data/mysql/.keepme delete mode 100644 data/pgsql/.keepme delete mode 100644 data/rabbit/.keepme diff --git a/.gitignore b/.gitignore index 0d784d12..01d80231 100644 --- a/.gitignore +++ b/.gitignore @@ -19,10 +19,6 @@ /log/[a-z0-9-]* # Ignore Data dirs -/data/mongo/* -/data/mysql/* -/data/pgsql/* -/data/rabbit/* /data/www/* # Ignore Certificate Authority diff --git a/data/mysql/.keepme b/data/mysql/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/data/pgsql/.keepme b/data/pgsql/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/data/rabbit/.keepme b/data/rabbit/.keepme deleted file mode 100644 index e69de29b..00000000 From f19a5d2ca2b8f7607e33979c88dee05f0f59715a Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 17 Nov 2018 13:27:17 +0100 Subject: [PATCH 05/11] Ensure mail uses a Docker volume --- README.md | 5 +++-- data/mongo/.keepme | 0 docker-compose.yml | 22 +++++++++++++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) delete mode 100644 data/mongo/.keepme diff --git a/README.md b/README.md index 0acf7262..d7bb52c6 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,8 @@ Every single attachable container comes with many different versions. In order t ... - 4.0 + + @@ -327,7 +328,7 @@ Every single attachable container comes with many different versions. In order t latest - latest + diff --git a/data/mongo/.keepme b/data/mongo/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/docker-compose.yml b/docker-compose.yml index e6208388..1e0644a8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -519,6 +519,7 @@ volumes: # ------------------------------------------------------------ devilbox-mail: + # ------------------------------------------------------------ # MySQL # ------------------------------------------------------------ devilbox-mysql-5.5: @@ -540,24 +541,39 @@ volumes: devilbox-pgsql-9.0: devilbox-pgsql-9.1: devilbox-pgsql-9.2: + devilbox-pgsql-9.2-alpine: devilbox-pgsql-9.3: + devilbox-pgsql-9.3-alpine: devilbox-pgsql-9.4: + devilbox-pgsql-9.4-alpine: devilbox-pgsql-9.5: + devilbox-pgsql-9.5-alpine: devilbox-pgsql-9.6: + devilbox-pgsql-9.6-alpine: devilbox-pgsql-10.0: + devilbox-pgsql-10.0-alpine: devilbox-pgsql-10.1: + devilbox-pgsql-10.1-alpine: devilbox-pgsql-10.2: + devilbox-pgsql-10.2-alpine: devilbox-pgsql-10.3: + devilbox-pgsql-10.3-alpine: devilbox-pgsql-10.4: + devilbox-pgsql-10.4-alpine: devilbox-pgsql-10.5: + devilbox-pgsql-10.5-alpine: + devilbox-pgsql-10.6: + devilbox-pgsql-10.6-alpine: + devilbox-pgsql-11.0: + devilbox-pgsql-11.0-alpine: + devilbox-pgsql-11.1: + devilbox-pgsql-11.1-alpine: devilbox-pgsql-latest: + devilbox-pgsql-alpine: # ------------------------------------------------------------ # MongoDB # ------------------------------------------------------------ - devilbox-mongo-2.2: - devilbox-mongo-2.4: - devilbox-mongo-2.6: devilbox-mongo-2.8: devilbox-mongo-3.0: devilbox-mongo-3.2: From ef2f39f7948dc0fed622a200b80aa677af39de81 Mon Sep 17 00:00:00 2001 From: cytopia Date: Wed, 6 Feb 2019 20:06:21 +0100 Subject: [PATCH 06/11] Clean up docker-compose.yml --- docker-compose.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1e0644a8..e9f16711 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -172,7 +172,7 @@ services: - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} # Mount logs - - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER:-7.0}:/var/log/php:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:rw${MOUNT_OPTIONS} # Mount Mail directory - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} @@ -182,15 +182,15 @@ services: # Mount devilbox user-defined *.ini files in order # to overwrite the default PHP.ini configuration - - ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER:-7.0}:/etc/php-custom.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER}:/etc/php-custom.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined PHP-FPM *.conf files in order # to overwrite the default PHP-FPM configuration - - ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER:-7.0}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined *.so files in order # to load custom PHP modules - - ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER:-7.0}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS} # Mount devilbox user-defined PHP-FPM startup *.sh scripts - ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.1.d:rw${MOUNT_OPTIONS} @@ -289,13 +289,13 @@ services: - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} # Mount custom web server config directory - - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER:-nginx-stable}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS} # Mount custom vhost-templates - ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d:rw${MOUNT_OPTIONS} # Mount logs - - ${DEVILBOX_PATH}/log/${HTTPD_SERVER:-nginx-stable}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS} # Certificate Authority public key - ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS} @@ -352,17 +352,17 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/${MYSQL_SERVER:-mariadb-10.3}:/var/log/mysql:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql:rw${MOUNT_OPTIONS} # Mount devilbox default overwrites - - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER:-mariadb-10.3}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} # Mount devilbox user-defined cnf files in order # to overwrite the MySQL server configuration - - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER:-mariadb-10.3}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} # Mount MySQL Data directory - - devilbox-${MYSQL_SERVER:-mariadb-10.3}:/var/lib/mysql:rw${MOUNT_OPTIONS} + - devilbox-${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS} depends_on: - bind @@ -396,10 +396,10 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER:-latest}:/var/log/postgresql:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER}:/var/log/postgresql:rw${MOUNT_OPTIONS} # Mount PostgreSQL Data directory - - devilbox-pgsql-${PGSQL_SERVER:-latest}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} + - devilbox-pgsql-${PGSQL_SERVER}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} depends_on: - bind @@ -432,7 +432,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER:-latest}:/var/log/redis:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER}:/var/log/redis:rw${MOUNT_OPTIONS} depends_on: - bind @@ -460,7 +460,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount logs - - ${DEVILBOX_PATH}/log/memcd-${MEMCD_SERVER:-latest}:/var/log/memcd:rw${MOUNT_OPTIONS} + - ${DEVILBOX_PATH}/log/memcd-${MEMCD_SERVER}:/var/log/memcd:rw${MOUNT_OPTIONS} depends_on: - bind @@ -488,7 +488,7 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount MongoDB Data directory - - devilbox-mongo-${MONGO_SERVER:-latest}:/data/db:rw${MOUNT_OPTIONS} + - devilbox-mongo-${MONGO_SERVER}:/data/db:rw${MOUNT_OPTIONS} depends_on: - bind From cfba16f887826909a4e68cc10b436b53f46d558e Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 28 Feb 2019 14:31:18 +0100 Subject: [PATCH 07/11] Restore failed rebase --- .devilbox/etc/mariadb-10.2/.keepme | 0 .devilbox/etc/mariadb-10.3/.keepme | 0 .devilbox/etc/mariadb-5.5/.keepme | 0 .devilbox/etc/mysql-5.5/.keepme | 0 .devilbox/etc/mysql-5.6/.keepme | 0 .devilbox/etc/mysql-5.7/.keepme | 0 .devilbox/etc/mysql-8.0/.keepme | 0 .devilbox/etc/mysql-8.0/charset.cnf | 10 - .devilbox/www/config.php | 4 +- .devilbox/www/htdocs/index.php | 6 +- .gitignore | 3 + .travis.yml | 3 + CHANGELOG.md | 1 + README.md | 28 +- .../mariadb-10.0 => cfg/mariadb-10.4}/.keepme | 0 cfg/mariadb-10.4/devilbox-custom.cnf-example | 5 + .../mariadb-10.1 => cfg/percona-8.0}/.keepme | 0 cfg/percona-8.0/devilbox-custom.cnf-example | 5 + docker-compose.yml | 43 +-- docs/configuration-files/env-file.rst | 251 +++++------------- docs/configuration-files/my-cnf.rst | 2 + docs/intermediate/best-practice.rst | 80 ------ docs/intermediate/read-log-files.rst | 4 - docs/maintenance/update-the-devilbox.rst | 20 +- env-example | 76 +----- update-docker.sh | 3 +- 26 files changed, 120 insertions(+), 424 deletions(-) delete mode 100644 .devilbox/etc/mariadb-10.2/.keepme delete mode 100644 .devilbox/etc/mariadb-10.3/.keepme delete mode 100644 .devilbox/etc/mariadb-5.5/.keepme delete mode 100644 .devilbox/etc/mysql-5.5/.keepme delete mode 100644 .devilbox/etc/mysql-5.6/.keepme delete mode 100644 .devilbox/etc/mysql-5.7/.keepme delete mode 100644 .devilbox/etc/mysql-8.0/.keepme delete mode 100644 .devilbox/etc/mysql-8.0/charset.cnf rename {.devilbox/etc/mariadb-10.0 => cfg/mariadb-10.4}/.keepme (100%) create mode 100644 cfg/mariadb-10.4/devilbox-custom.cnf-example rename {.devilbox/etc/mariadb-10.1 => cfg/percona-8.0}/.keepme (100%) create mode 100644 cfg/percona-8.0/devilbox-custom.cnf-example diff --git a/.devilbox/etc/mariadb-10.2/.keepme b/.devilbox/etc/mariadb-10.2/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mariadb-10.3/.keepme b/.devilbox/etc/mariadb-10.3/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mariadb-5.5/.keepme b/.devilbox/etc/mariadb-5.5/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mysql-5.5/.keepme b/.devilbox/etc/mysql-5.5/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mysql-5.6/.keepme b/.devilbox/etc/mysql-5.6/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mysql-5.7/.keepme b/.devilbox/etc/mysql-5.7/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mysql-8.0/.keepme b/.devilbox/etc/mysql-8.0/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/.devilbox/etc/mysql-8.0/charset.cnf b/.devilbox/etc/mysql-8.0/charset.cnf deleted file mode 100644 index ffc8846f..00000000 --- a/.devilbox/etc/mysql-8.0/charset.cnf +++ /dev/null @@ -1,10 +0,0 @@ -[client] -default-character-set=utf8 - -[mysql] -default-character-set=utf8 - - -[mysqld] -collation-server = utf8_unicode_ci -character-set-server = utf8 diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index f0b8195f..d26b7106 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ error_reporting(-1); putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v0.15.0'; -$DEVILBOX_DATE = '2019-03-18'; +$DEVILBOX_VERSION = 'v1.0.0-alpha1'; +$DEVILBOX_DATE = '2019-03-09'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index a9a2acd9..6c185489 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -679,14 +679,14 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL); mysql - getEnv('HOST_PATH_MYSQL_DATADIR').'/'.loadClass('Helper')->getEnv('MYSQL_SERVER'); ?> + Docker volume /var/lib/mysql pgsql - getEnv('HOST_PATH_PGSQL_DATADIR').'/'.loadClass('Helper')->getEnv('PGSQL_SERVER'); ?> + Docker volume /var/lib/postgresql/data/pgdata @@ -707,7 +707,7 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL); mongo - getEnv('HOST_PATH_MONGO_DATADIR'); ?> + Docker volume /data/db diff --git a/.gitignore b/.gitignore index 01d80231..79aaedb5 100644 --- a/.gitignore +++ b/.gitignore @@ -47,9 +47,12 @@ /cfg/mariadb-10.0/*.cnf /cfg/mariadb-10.1/*.cnf /cfg/mariadb-10.2/*.cnf +/cfg/mariadb-10.3/*.cnf +/cfg/mariadb-10.4/*.cnf /cfg/percona-5.5/*.cnf /cfg/percona-5.6/*.cnf /cfg/percona-5.7/*.cnf +/cfg/percona-8.0/*.cnf # Ignore custom PHP.ini configs /cfg/php-ini-5.2/*.ini diff --git a/.travis.yml b/.travis.yml index cfd166b1..7ad8b029 100644 --- a/.travis.yml +++ b/.travis.yml @@ -142,9 +142,12 @@ env: - S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.0 - S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.1 - S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.2 + - S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.3 + - S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.4 - S1=PHP V1=7.2 S2=MYSQL V2=percona-5.5 - S1=PHP V1=7.2 S2=MYSQL V2=percona-5.6 - S1=PHP V1=7.2 S2=MYSQL V2=percona-5.7 + - S1=PHP V1=7.2 S2=MYSQL V2=percona-8.0 # PHP 7.2 vs PgSQL - S1=PHP V1=7.2 S2=PGSQL V2=9.0 - S1=PHP V1=7.2 S2=PGSQL V2=9.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7856829a..c7985138 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ major versions. - Use Docker volumes instead of directory mounts for stateful data (MySQL, PgSQL and MongoDB) - This fixes various mount issues on Windows: #175 #382 - This improves general performance +- Use Official MySQL, MariaDB and Percona Docker container ## v0.15.0 diff --git a/README.md b/README.md index d7bb52c6..566d7a6a 100644 --- a/README.md +++ b/README.md @@ -214,9 +214,9 @@ Every single attachable container comes with many different versions. In order t 2.2 stable 5.2[1] - 5.5 - 5.5 - 5.5 + 5.5 + 5.5 + 5.5 9.0 2.8 1.4 @@ -226,9 +226,9 @@ Every single attachable container comes with many different versions. In order t 2.4 mainline 5.3 - 5.6 - 10.0 - 5.6 + 5.6 + 10.0 + 5.6 9.1 3.0 1.5 @@ -238,9 +238,9 @@ Every single attachable container comes with many different versions. In order t 5.4 - 5.7 - 10.1 - 5.7 + 5.7 + 10.1 + 5.7 9.2 3.2 latest @@ -250,9 +250,9 @@ Every single attachable container comes with many different versions. In order t 5.5 - 8.0 - 10.2 - + 8.0 + 10.2 + 8.0 9.3 4.0 @@ -263,7 +263,7 @@ Every single attachable container comes with many different versions. In order t 5.6 - 10.3 + 10.3 9.4 5.0 @@ -275,7 +275,7 @@ Every single attachable container comes with many different versions. In order t 7.0 - + 10.4 9.5 latest diff --git a/.devilbox/etc/mariadb-10.0/.keepme b/cfg/mariadb-10.4/.keepme similarity index 100% rename from .devilbox/etc/mariadb-10.0/.keepme rename to cfg/mariadb-10.4/.keepme diff --git a/cfg/mariadb-10.4/devilbox-custom.cnf-example b/cfg/mariadb-10.4/devilbox-custom.cnf-example new file mode 100644 index 00000000..6d2549fa --- /dev/null +++ b/cfg/mariadb-10.4/devilbox-custom.cnf-example @@ -0,0 +1,5 @@ +[mysqld] +;key_buffer_size=16M + +[mysqldump] +;quick diff --git a/.devilbox/etc/mariadb-10.1/.keepme b/cfg/percona-8.0/.keepme similarity index 100% rename from .devilbox/etc/mariadb-10.1/.keepme rename to cfg/percona-8.0/.keepme diff --git a/cfg/percona-8.0/devilbox-custom.cnf-example b/cfg/percona-8.0/devilbox-custom.cnf-example new file mode 100644 index 00000000..6d2549fa --- /dev/null +++ b/cfg/percona-8.0/devilbox-custom.cnf-example @@ -0,0 +1,5 @@ +[mysqld] +;key_buffer_size=16M + +[mysqldump] +;quick diff --git a/docker-compose.yml b/docker-compose.yml index e9f16711..7628f00d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -309,35 +309,12 @@ services: # MySQL Database # ------------------------------------------------------------ mysql: - image: cytopia/${MYSQL_SERVER}:latest + image: devilbox/mysql:${MYSQL_SERVER} hostname: mysql environment: - - ## - ## Debug? - ## - - DEBUG_COMPOSE_ENTRYPOINT - - ## - ## Adjust timezone - ## - - TIMEZONE - - ## - ## Adjust Root password - ## - MYSQL_ROOT_PASSWORD - - ## - ## Socket directory Path - ## - - MYSQL_SOCKET_DIR=/tmp/mysql - - ## - ## Runtime settings - ## - - MYSQL_GENERAL_LOG=${MYSQL_GENERAL_LOG} + - MYSQL_ALLOW_EMPTY_PASSWORD=yes ports: # [local-machine:]local-port:docker-port @@ -351,12 +328,6 @@ services: # ---- Format: ---- # HOST-DIRECTORY : DOCKER-DIRECTORY - # Mount logs - - ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql:rw${MOUNT_OPTIONS} - - # Mount devilbox default overwrites - - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS} - # Mount devilbox user-defined cnf files in order # to overwrite the MySQL server configuration - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS} @@ -427,13 +398,6 @@ services: app_net: ipv4_address: 172.16.238.14 - volumes: - # ---- Format: ---- - # HOST-DIRECTORY : DOCKER-DIRECTORY - - # Mount logs - - ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER}:/var/log/redis:rw${MOUNT_OPTIONS} - depends_on: - bind - php @@ -510,6 +474,7 @@ networks: - subnet: 172.16.238.0/24 gateway: 172.16.238.1 + ################################################################################ # VOLUMES ################################################################################ @@ -531,9 +496,11 @@ volumes: devilbox-mariadb-10.1: devilbox-mariadb-10.2: devilbox-mariadb-10.3: + devilbox-mariadb-10.4: devilbox-percona-5.5: devilbox-percona-5.6: devilbox-percona-5.7: + devilbox-percona-8.0: # ------------------------------------------------------------ # Postgres diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index 21aff834..6bd3759e 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -397,7 +397,7 @@ This is especially useful to keep PHP and database timezones in sync. +-----------------------+----------------+-------------------+ | Name | Allowed values | Default value | +=======================+================+===================+ -| ``TIMEZONE`` | valid timezone | ``Europe/Berlin`` | +| ``TIMEZONE`` | valid timezone | ``UTC`` | +-----------------------+----------------+-------------------+ Have a look at Wikipedia to get a list of valid timezones: |ext_lnk_doc_wiki_database_timezones| @@ -628,7 +628,7 @@ This variable choses your desired MySQL server version to be started. +-------------------------+------------------------------------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+================================================================================================+==================+ -| ``MYSQL_SERVER`` | ``mysql-5.5`` |br| ``mysql-5.6`` |br| ``mariadb-10.2`` |br| ``percona-5.7`` |br| and many more | ``mariadb-10.1`` | +| ``MYSQL_SERVER`` | ``mysql-5.5`` |br| ``mysql-5.6`` |br| ``mariadb-10.2`` |br| ``percona-5.7`` |br| and many more | ``mariadb-10.3`` | +-------------------------+------------------------------------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: @@ -645,12 +645,14 @@ All values are already available in the ``.env`` file and just need to be commen #MYSQL_SERVER=mysql-8.0 #MYSQL_SERVER=mariadb-5.5 #MYSQL_SERVER=mariadb-10.0 - MYSQL_SERVER=mariadb-10.1 + #MYSQL_SERVER=mariadb-10.1 #MYSQL_SERVER=mariadb-10.2 - #MYSQL_SERVER=mariadb-10.3 + MYSQL_SERVER=mariadb-10.3 + #MYSQL_SERVER=mariadb-10.4 #MYSQL_SERVER=percona-5.5 #MYSQL_SERVER=percona-5.6 #MYSQL_SERVER=percona-5.7 + #MYSQL_SERVER=percona-8.0 .. _env_pgsql_server: @@ -663,7 +665,7 @@ This variable choses your desired PostgreSQL server version to be started. +-------------------------+-------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+===================================================================+==================+ -| ``PGSQL_SERVER`` | ``9.1`` |br| ``9.2`` |br| ``9.3`` |br| ``9.4`` |br| and many more | ``9.6`` | +| ``PGSQL_SERVER`` | ``9.1`` |br| ``9.2`` |br| ``9.3`` |br| ``9.4`` |br| and many more | ``11.1`` | +-------------------------+-------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: @@ -674,13 +676,38 @@ All values are already available in the ``.env`` file and just need to be commen host> grep PGSQL_SERVER .env + #PGSQL_SERVER=9.0 #PGSQL_SERVER=9.1 #PGSQL_SERVER=9.2 + #PGSQL_SERVER=9.2-alpine #PGSQL_SERVER=9.3 + #PGSQL_SERVER=9.3-alpine #PGSQL_SERVER=9.4 + #PGSQL_SERVER=9.4-alpine #PGSQL_SERVER=9.5 - PGSQL_SERVER=9.6 + #PGSQL_SERVER=9.5-alpine + #PGSQL_SERVER=9.6 + #PGSQL_SERVER=9.6-alpine #PGSQL_SERVER=10.0 + #PGSQL_SERVER=10.0-alpine + #PGSQL_SERVER=10.1 + #PGSQL_SERVER=10.1-alpine + #PGSQL_SERVER=10.2 + #PGSQL_SERVER=10.2-alpine + #PGSQL_SERVER=10.3 + #PGSQL_SERVER=10.3-alpine + #PGSQL_SERVER=10.4 + #PGSQL_SERVER=10.4-alpine + #PGSQL_SERVER=10.5 + #PGSQL_SERVER=10.5-alpine + #PGSQL_SERVER=10.6 + #PGSQL_SERVER=10.6-alpine + #PGSQL_SERVER=11.0 + #PGSQL_SERVER=11.0-alpine + PGSQL_SERVER=11.1 + #PGSQL_SERVER=11.1-alpine + #PGSQL_SERVER=latest + #PGSQL_SERVER=alpine .. note:: This is the official PostgreSQL server which might already have other tags available, @@ -698,7 +725,7 @@ This variable choses your desired Redis server version to be started. +-------------------------+-------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+===================================================================+==================+ -| ``REDIS_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``4.0`` |br| and many more | ``4.0`` | +| ``REDIS_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``4.0`` |br| and many more | ``5.0`` | +-------------------------+-------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: @@ -711,8 +738,15 @@ All values are already available in the ``.env`` file and just need to be commen #REDIS_SERVER=2.8 #REDIS_SERVER=3.0 + #REDIS_SERVER=3.0-alpine #REDIS_SERVER=3.2 - REDIS_SERVER=4.0 + #REDIS_SERVER=3.2-alpine + #REDIS_SERVER=4.0 + #REDIS_SERVER=4.0-alpine + REDIS_SERVER=5.0 + #REDIS_SERVER=5.0-alpine + #REDIS_SERVER=latest + #REDIS_SERVER=alpine .. note:: This is the official Redis server which might already have other tags available, @@ -727,43 +761,26 @@ MEMCD_SERVER This variable choses your desired Memcached server version to be started. -+-------------------------+-------------------------------------------------------------------------------+------------------+ -| Name | Allowed values | Default value | -+=========================+===============================================================================+==================+ -| ``MEMCD_SERVER`` | ``1.4.21`` |br| ``1.4.22`` |br| ``1.4.23`` |br| ``1.4.24`` |br| and many more | ``1.5.2`` | -+-------------------------+-------------------------------------------------------------------------------+------------------+ ++-------------------------+---------------------------------------------------------------------------------------------+------------------+ +| Name | Allowed values | Default value | ++=========================+=============================================================================================+==================+ +| ``MEMCD_SERVER`` | ``1.4`` |br| ``1.4-alpine`` |br| ``1.5`` |br| ``1.5-alpine`` |br| ``latest`` and ``alpine`` | ``1.5`` | ++-------------------------+---------------------------------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 24 + :emphasize-lines: 5 host> grep MEMCD_SERVER .env - #MEMCD_SERVER=1.4.21 - #MEMCD_SERVER=1.4.22 - #MEMCD_SERVER=1.4.23 - #MEMCD_SERVER=1.4.24 - #MEMCD_SERVER=1.4.25 - #MEMCD_SERVER=1.4.26 - #MEMCD_SERVER=1.4.27 - #MEMCD_SERVER=1.4.28 - #MEMCD_SERVER=1.4.29 - #MEMCD_SERVER=1.4.30 - #MEMCD_SERVER=1.4.31 - #MEMCD_SERVER=1.4.32 - #MEMCD_SERVER=1.4.33 - #MEMCD_SERVER=1.4.34 - #MEMCD_SERVER=1.4.35 - #MEMCD_SERVER=1.4.36 - #MEMCD_SERVER=1.4.37 - #MEMCD_SERVER=1.4.38 - #MEMCD_SERVER=1.4.39 - #MEMCD_SERVER=1.5.0 - #MEMCD_SERVER=1.5.1 - MEMCD_SERVER=1.5.2 + #MEMCD_SERVER=1.4 + #MEMCD_SERVER=1.4-alpine + MEMCD_SERVER=1.5 + #MEMCD_SERVER=1.5-alpine #MEMCD_SERVER=latest + #MEMCD_SERVER=alpine .. note:: This is the official Memcached server which might already have other tags available, @@ -778,11 +795,11 @@ MONGO_SERVER This variable choses your desired MongoDB server version to be started. -+-------------------------+-------------------------------------------------------------------+------------------+ -| Name | Allowed values | Default value | -+=========================+===================================================================+==================+ -| ``MONGO_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``3.4`` |br| and many more | ``3.4`` | -+-------------------------+-------------------------------------------------------------------+------------------+ ++-------------------------+----------------------------------------------------------------------------+------------------+ +| Name | Allowed values | Default value | ++=========================+============================================================================+==================+ +| ``MONGO_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``3.4`` |br| ``4.0`` and ``latest`` | ``4.0`` | ++-------------------------+----------------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: @@ -795,8 +812,10 @@ All values are already available in the ``.env`` file and just need to be commen #MONGO_SERVER=2.8 #MONGO_SERVER=3.0 #MONGO_SERVER=3.2 - MONGO_SERVER=3.4 - #MONGO_SERVER=3.5 + #MONGO_SERVER=3.4 + #MONGO_SERVER=3.6 + MONGO_SERVER=4.0 + #MONGO_SERVER=latest .. note:: This is the official MongoDB server which might already have other tags available, @@ -904,134 +923,6 @@ always be ``/shared/httpd/``. ``docker-compose rm``. -.. _env_mysql_datadir: - -HOST_PATH_MYSQL_DATADIR ------------------------ - -This is an absolute or relative path (relative to Devilbox git directory) to your MySQL data directory. - -* Relative path: relative to the devilbox git directory (Must start with ``.``) -* Absolute path: Full path (Must start with ``/``) - -+------------------------------+----------------+------------------+ -| Name | Allowed values | Default value | -+==============================+================+==================+ -| ``HOST_PATH_MYSQL_DATADIR`` | valid path | ``./data/mysql`` | -+------------------------------+----------------+------------------+ - -Each MySQL, MariaDB or PerconaDB version will have its own subdirectory, so when first running MySQL 5.5 -and then starting MySQL 5.6, you will have a different database with different data. - -Having each version separated from each other makes sure that you don't accidently upgrade -from a lower to a higher version which might not be reversable. (MySQL auto-upgrade certain older -data files to newer, but this process does not necessarily work the other way round and could result in failues). - -The directory structure will look something like this: - -.. code-block:: bash - - host> ls -l ./data/mysql/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.0/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.1/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.2/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.3/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.5/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.6/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.7/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-8.0/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.5/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.6/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.7/ - -.. warning:: - :ref:`remove_stopped_container` - Whenever you change this value you have to stop the Devilbox and also remove the stopped - container via - ``docker-compose rm``. - - -.. _env_pgsql_datadir: - -HOST_PATH_PGSQL_DATADIR ------------------------ - -This is an absolute or relative path (relative to Devilbox git directory) to your PostgreSQL data directory. - -* Relative path: relative to the devilbox git directory (Must start with ``.``) -* Absolute path: Full path (Must start with ``/``) - -+------------------------------+----------------+------------------+ -| Name | Allowed values | Default value | -+==============================+================+==================+ -| ``HOST_PATH_PGSQL_DATADIR`` | valid path | ``./data/pgsql`` | -+------------------------------+----------------+------------------+ - -Each PostgreSQL version will have its own subdirectory, so when first running PostgreSQL 9.1 -and then starting PostgreSQL 10.0, you will have a different database with different data. - -Having each version separated from each other makes sure that you don't accidently upgrade -from a lower to a higher version which might not be reversable. - -The directory structure will look something like this: - -.. code-block:: bash - - host> ls -l ./data/pgsql/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.1/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.2/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.3/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.4/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.5/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.6/ - -.. warning:: - :ref:`remove_stopped_container` - Whenever you change this value you have to stop the Devilbox and also remove the stopped - container via - ``docker-compose rm``. - - -.. _env_mongo_datadir: - -HOST_PATH_MONGO_DATADIR ------------------------ - -This is an absolute or relative path (relative to Devilbox git directory) to your MongoDB data directory. - -* Relative path: relative to the devilbox git directory (Must start with ``.``) -* Absolute path: Full path (Must start with ``/``) - -+------------------------------+----------------+------------------+ -| Name | Allowed values | Default value | -+==============================+================+==================+ -| ``HOST_PATH_MONGO_DATADIR`` | valid path | ``./data/mongo`` | -+------------------------------+----------------+------------------+ - -Each MongoDB version will have its own subdirectory, so when first running MongoDB 2.8 -and then starting MongoDB 3.5, you will have a different database with different data. - -Having each version separated from each other makes sure that you don't accidently upgrade -from a lower to a higher version which might not be reversable. - -The directory structure will look something like this: - -.. code-block:: bash - - host> ls -l ./data/mongo/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 2.8/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.0/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.2/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.4/ - drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.5/ - -.. warning:: - :ref:`remove_stopped_container` - Whenever you change this value you have to stop the Devilbox and also remove the stopped - container via - ``docker-compose rm``. - - Docker host ports ================= @@ -1584,27 +1475,9 @@ be able to display information inside the bundled intranet. Keep this variable in sync with the actual MySQL root password. -MYSQL_GENERAL_LOG -^^^^^^^^^^^^^^^^^ - -This variable controls the logging behaviour of the MySQL server (MySQL, MariaDB and PerconaDB). -As the Devilbox is intended to be used for development, this feature is turned on by default. - -+-------------------------+-------------------+---------------------+ -| Name | Allowed values | Default value | -+=========================+===================+=====================+ -| ``MYSQL_GENERAL_LOG`` | ``0`` or ``1`` | ``0`` | -+-------------------------+-------------------+---------------------+ - -**MySQL documentation:** - "The general query log is a general record of what mysqld is doing. The server writes information to this log when clients connect or disconnect, and it logs each SQL statement received from clients. The general query log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld." - - -- |ext_lnk_doc_mysql_query_log| - PostgreSQL ---------- - PGSQL_ROOT_USER ^^^^^^^^^^^^^^^ diff --git a/docs/configuration-files/my-cnf.rst b/docs/configuration-files/my-cnf.rst index 4c14ea59..bc265525 100644 --- a/docs/configuration-files/my-cnf.rst +++ b/docs/configuration-files/my-cnf.rst @@ -38,6 +38,7 @@ See the directory structure for MySQL configuration directories inside ``./cfg/` 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/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.3/ + drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.4/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.5/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.6/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.7/ @@ -45,6 +46,7 @@ See the directory structure for MySQL configuration directories inside ``./cfg/` drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.5/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.6/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.7/ + drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-8.0/ Customization is achieved by placing a file into ``cfg/mysql-X.X/``, ``cfg/mariadb-X.X/`` or ``cfg/percona-X-X`` (where ``X.X`` stands for your MySQL version). diff --git a/docs/intermediate/best-practice.rst b/docs/intermediate/best-practice.rst index 7462aa5d..1ee7efda 100644 --- a/docs/intermediate/best-practice.rst +++ b/docs/intermediate/best-practice.rst @@ -34,86 +34,6 @@ Projects :ref:`howto_move_projects_to_a_different_directory` Follow this guide to keep your projects separated from the Devilbox git directory. -Databases ---------- - -Moving your projects out of the Devilbox git directory is one step, you still need to take care -about persistent data of all available databases as well. - -Let's assume you desired location for database storage is at ``/home/user/workspace/db/``. - -MySQL -^^^^^ - -All you have to to is to adjust the path of :ref:`env_mysql_datadir` in the ``.env`` file. - -.. code-block:: bash - - # Navigate to Devilbox git directory - host> cd path/to/devilbox - - # Open the .env file with your favourite editor - host> vim .env - -Now Adjust the value of :ref:`env_mysql_datadir` - -.. code-block:: bash - :caption: .env - :emphasize-lines: 1 - - HOST_PATH_MYSQL_DATADIR=/home/user/workspace/db/mysql - -That's it, whenever you start up the Devilbox ``/home/user/workspace/db/mysql/`` will be mounted -into the MySQL container. - -PostgreSQL -^^^^^^^^^^ - -All you have to to is to adjust the path of :ref:`env_pgsql_datadir` in the ``.env`` file. - -.. code-block:: bash - - # Navigate to Devilbox git directory - host> cd path/to/devilbox - - # Open the .env file with your favourite editor - host> vim .env - -Now Adjust the value of :ref:`env_pgsql_datadir` - -.. code-block:: bash - :caption: .env - :emphasize-lines: 1 - - HOST_PATH_PGSQL_DATADIR=/home/user/workspace/db/pgsql - -That's it, whenever you start up the Devilbox ``/home/user/workspace/db/pqsql/`` will be mounted -into the PostgreSQL container. - -MongoDB -^^^^^^^ - -All you have to to is to adjust the path of :ref:`env_mongo_datadir` in the ``.env`` file. - -.. code-block:: bash - - # Navigate to Devilbox git directory - host> cd path/to/devilbox - - # Open the .env file with your favourite editor - host> vim .env - -Now Adjust the value of :ref:`env_mongo_datadir` - -.. code-block:: bash - :caption: .env - :emphasize-lines: 1 - - HOST_PATH_MONGO_DATADIR=/home/user/workspace/db/mongo - -That's it, whenever you start up the Devilbox ``/home/user/workspace/db/mongo/`` will be mounted -into the MongoDB container. - Version control ``.env`` file ----------------------------- diff --git a/docs/intermediate/read-log-files.rst b/docs/intermediate/read-log-files.rst index 93cc6bfd..809599a7 100644 --- a/docs/intermediate/read-log-files.rst +++ b/docs/intermediate/read-log-files.rst @@ -36,10 +36,6 @@ The log directory structure would look something like this: │   ├── defaultlocalhost-error.log │   ├── -access.log # Each project has its own access log │   ├── -error.log # Each project has its own error log - ├── mariadb-10.1/ - │   ├── error.log - │   ├── query.log - │   ├── slow.log ├── php-fpm-7.1/ │   ├── php-fpm.access │   ├── php-fpm.error diff --git a/docs/maintenance/update-the-devilbox.rst b/docs/maintenance/update-the-devilbox.rst index b31cc697..19b318d5 100644 --- a/docs/maintenance/update-the-devilbox.rst +++ b/docs/maintenance/update-the-devilbox.rst @@ -141,13 +141,13 @@ You first need to find out the image name and then also the currently used image host> grep 'image:' docker-compose.yml image: cytopia/bind:0.11 - image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work - image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.13 - image: cytopia/${MYSQL_SERVER:-mariadb-10.1}:latest - image: postgres:${PGSQL_SERVER:-9.6} - image: redis:${REDIS_SERVER:-3.2} - image: memcached:${MEMCD_SERVER:-latest} - image: mongo:${MONGO_SERVER:-latest} + image: devilbox/php-fpm:${PHP_SERVER}-work + image: devilbox/${HTTPD_SERVER}:0.13 + image: devilbox/mysql-${MYSQL_SERVER} + image: postgres:${PGSQL_SERVER} + image: redis:${REDIS_SERVER} + image: memcached:${MEMCD_SERVER} + image: mongo:${MONGO_SERVER} After having found the possible candidates, you will still have to find the corresponding value inside the ``..env`` file. Let's do it for the PHP image: @@ -156,14 +156,14 @@ inside the ``..env`` file. Let's do it for the PHP image: host> grep '^PHP_SERVER' .env - PHP_SERVER=5.6 + PHP_SERVER=7.2 -So now you can substitute the ``${PHP_SERVER}`` variable from the first command with ``5.6`` and +So now you can substitute the ``${PHP_SERVER}`` variable from the first command with ``7.2`` and finally pull a newer version: .. code-block:: bash - host> docker pull devilbox/php-fpm:5.6-work + host> docker pull devilbox/php-fpm:7.2-work Not very efficient. diff --git a/env-example b/env-example index c2bc7768..1d560b2f 100644 --- a/env-example +++ b/env-example @@ -134,9 +134,9 @@ NEW_GID=1000 ### -### Timezone for all dockers and service config files +### Timezone for PHP Docker container (system and php.ini) ### -TIMEZONE=Europe/Berlin +TIMEZONE=UTC @@ -288,9 +288,11 @@ HTTPD_SERVER=nginx-stable #MYSQL_SERVER=mariadb-10.1 #MYSQL_SERVER=mariadb-10.2 MYSQL_SERVER=mariadb-10.3 +#MYSQL_SERVER=mariadb-10.4 #MYSQL_SERVER=percona-5.5 #MYSQL_SERVER=percona-5.6 #MYSQL_SERVER=percona-5.7 +#MYSQL_SERVER=percona-8.0 ### @@ -416,70 +418,6 @@ MOUNT_OPTIONS= HOST_PATH_HTTPD_DATADIR=./data/www -### -### Local filesystem path to mysql/mariadb datadir. -### -### This can be an existing mysql data directory or empty. -### If it already is a mysql data directory with content, -### it will be mounted into the docker and used. -### -### If this directory is empty, a new mysql database will be -### created. -### -### Note: Inside this path, a subdirectory with the mysql|mariadb -### version will be created where the actual data resides. -### This is to protect databases from being altered by -### newer or older mysql|mariadb server versions. -### -### Note: When changing this variable you must re-create the container. -### Simply remove it, it will be auto-created during the next start: -### -### $ docker-compose rm -f -### -HOST_PATH_MYSQL_DATADIR=./data/mysql - - -### -### Local filesystem path to postgresql datadir. -### -### This can be an existing postgresql data directory or empty. -### If it already is a postgresql data directory with content, -### it will be mounted into the docker and used. -### -### If this directory is empty, a new postgresql database will be -### created. -### -### Note: Inside this path, a subdirectory with the postgresql -### version will be created where the actual data resides. -### This is to protect databases from being altered by -### newer or older postgres server versions. -### -### Note: When changing this variable you must re-create the container. -### Simply remove it, it will be auto-created during the next start: -### -### $ docker-compose rm -f -### -HOST_PATH_PGSQL_DATADIR=./data/pgsql - - -### -### Local filesystem path to mongodb datadir. -### -### This can be an existing mongodb data directory or empty. -### If it already is a mongodb data directory with content, -### it will be mounted into the docker and used. -### -### If this directory is empty, a new mongodb database will be -### created. -### -### Note: When changing this variable you must re-create the container. -### Simply remove it, it will be auto-created during the next start: -### -### $ docker-compose rm -f -### -HOST_PATH_MONGO_DATADIR=./data/mongo - - ################################################################################ ### @@ -592,12 +530,6 @@ HTTPD_NGINX_WORKER_CONNECTIONS=1024 MYSQL_ROOT_PASSWORD= -### -### Custom MySQL Runtime Settings -### -MYSQL_GENERAL_LOG=0 - - ### ### Expose MySQL Port to Host ### diff --git a/update-docker.sh b/update-docker.sh index fbf927b0..f8d0a136 100755 --- a/update-docker.sh +++ b/update-docker.sh @@ -70,10 +70,9 @@ fi ### MYSQL ### if [ "${WHICH}" = "all" ] || [ "${WHICH}" = "mysql" ]; then - SUFFIX="$( grep -E '^\s+image:\s+cytopia/\${MYSQL_SERVER' "${CWD}/docker-compose.yml" | sed 's/.*://g' )" IMAGES="$( grep -Eo '^#*MYSQL_SERVER=[-a-z]+[.0-9]*' "${CWD}/env-example" | sed 's/.*=//g' )" echo "${IMAGES}" | while read version ; do - docker pull cytopia/${version}:${SUFFIX} + docker pull devilbox/mysql:${version} done fi From 1138c498c7e6ef90f84e4b44ba060ac63def83bd Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 9 Mar 2019 16:57:24 +0100 Subject: [PATCH 08/11] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7985138..c605230a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ major versions. - This fixes various issues with Docker Toolbox and DNS resolution: #119 -## v1.0.0-alpha1 [unreleased] +## v1.0.0-alpha1 #### Changed - Use Docker volumes instead of directory mounts for stateful data (MySQL, PgSQL and MongoDB) From 9e3da94edb4d50eb14487170a024788b2fa55cad Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 18 Mar 2019 19:13:23 +0100 Subject: [PATCH 09/11] Prepare Devilbox v1.0.0 release --- .devilbox/www/config.php | 4 ++-- CHANGELOG.md | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index d26b7106..5744da6b 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ error_reporting(-1); putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v1.0.0-alpha1'; -$DEVILBOX_DATE = '2019-03-09'; +$DEVILBOX_VERSION = 'v1.0.0'; +$DEVILBOX_DATE = '2019-03-18'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/CHANGELOG.md b/CHANGELOG.md index c605230a..31e1317d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ major versions. - This fixes various issues with Docker Toolbox and DNS resolution: #119 +## v1.0.0 + +#### Changed +- Everything from v1.0.0-alpha1 has been backported +- Everything from v0.15.0 has been backported + + ## v1.0.0-alpha1 #### Changed From 2b521c9e71129587f55322bfdcde2fadc112de46 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 18 Mar 2019 19:15:46 +0100 Subject: [PATCH 10/11] Remove migration announcement --- docs/_includes/snippets/__ANNOUNCEMENTS__.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/_includes/snippets/__ANNOUNCEMENTS__.rst b/docs/_includes/snippets/__ANNOUNCEMENTS__.rst index 28058d01..e69de29b 100644 --- a/docs/_includes/snippets/__ANNOUNCEMENTS__.rst +++ b/docs/_includes/snippets/__ANNOUNCEMENTS__.rst @@ -1,7 +0,0 @@ -.. raw:: html - -
-

Important Announcement

-

Everybody is strongly encouraged to switch to the upcoming v1.0.0 release version to prevent unforseen issues upon merge to master.

-

Instructions here: https://github.com/cytopia/devilbox/pull/416.

-
From c2b8a53efcf198c0166965a25d3b7487ad7be685 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 18 Mar 2019 19:28:22 +0100 Subject: [PATCH 11/11] #500 docs troubleshooting mysql --- docs/support/troubleshooting.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/support/troubleshooting.rst b/docs/support/troubleshooting.rst index a89d15bc..418bd5ac 100644 --- a/docs/support/troubleshooting.rst +++ b/docs/support/troubleshooting.rst @@ -308,6 +308,13 @@ To mitigate that issue, make sure that the ``swoole`` module is disabled in ``.e Database issues =============== +SQLSTATE[HY000] [1130] Host '172.16.238.10' is not allowed to connect to this MariaDB server +-------------------------------------------------------------------------------------------- + +.. seealso:: :ref:`troubleshooting_cant_connect_to_mysql_adter_restart` + +.. _troubleshooting_cant_connect_to_mysql_adter_restart: + Cannot connect to MySQL after restart -------------------------------------