diff --git a/.devilbox/etc/mariadb-10.2/.keepme b/.devilbox/etc/mariadb-10.2/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mariadb-10.3/.keepme b/.devilbox/etc/mariadb-10.3/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mariadb-5.5/.keepme b/.devilbox/etc/mariadb-5.5/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mysql-5.5/.keepme b/.devilbox/etc/mysql-5.5/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mysql-5.6/.keepme b/.devilbox/etc/mysql-5.6/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mysql-5.7/.keepme b/.devilbox/etc/mysql-5.7/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mysql-8.0/.keepme b/.devilbox/etc/mysql-8.0/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/.devilbox/etc/mysql-8.0/charset.cnf b/.devilbox/etc/mysql-8.0/charset.cnf deleted file mode 100644 index ffc8846f9..000000000 --- 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 f0b8195fb..5744da6bc 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,7 +13,7 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v0.15.0'; +$DEVILBOX_VERSION = 'v1.0.0'; $DEVILBOX_DATE = '2019-03-18'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index a9a2acd9f..6c1854898 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -679,14 +679,14 @@ 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 @@ mongo - getEnv('HOST_PATH_MONGO_DATADIR'); ?> + Docker volume /data/db diff --git a/.gitignore b/.gitignore index 0d784d129..79aaedb53 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 @@ -51,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 cfd166b1c..7ad8b0290 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 7856829ad..31e1317d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,20 @@ major versions. - This fixes various issues with Docker Toolbox and DNS resolution: #119 -## v1.0.0-alpha1 [unreleased] +## 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 - 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 d7bb52c67..566d7a6ae 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 000000000..6d2549fa4 --- /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 000000000..6d2549fa4 --- /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/data/mongo/.keepme b/data/mongo/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/data/mysql/.keepme b/data/mysql/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/data/pgsql/.keepme b/data/pgsql/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/data/rabbit/.keepme b/data/rabbit/.keepme deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker-compose.yml b/docker-compose.yml index 449be04f0..7628f00da 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,18 +328,12 @@ 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} # Mount MySQL Data directory - - ${HOST_PATH_MYSQL_DATADIR}/${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS} + - devilbox-${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS} depends_on: - bind @@ -399,7 +370,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}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS} depends_on: - bind @@ -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 @@ -488,7 +452,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}:/data/db:rw${MOUNT_OPTIONS} depends_on: - bind @@ -510,6 +474,7 @@ networks: - subnet: 172.16.238.0/24 gateway: 172.16.238.1 + ################################################################################ # VOLUMES ################################################################################ @@ -518,3 +483,68 @@ 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-mariadb-10.4: + devilbox-percona-5.5: + devilbox-percona-5.6: + devilbox-percona-5.7: + devilbox-percona-8.0: + + # ------------------------------------------------------------ + # Postgres + # ------------------------------------------------------------ + 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.8: + devilbox-mongo-3.0: + devilbox-mongo-3.2: + devilbox-mongo-3.4: + devilbox-mongo-3.6: + devilbox-mongo-4.0: + devilbox-mongo-latest: diff --git a/docs/_includes/snippets/__ANNOUNCEMENTS__.rst b/docs/_includes/snippets/__ANNOUNCEMENTS__.rst index 28058d016..e69de29bb 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.

-
diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index 21aff8341..6bd3759ee 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 4c14ea59d..bc2655259 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 7462aa5dd..1ee7efda7 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 93cc6bfd3..809599a7d 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 b31cc6971..19b318d5a 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/docs/support/troubleshooting.rst b/docs/support/troubleshooting.rst index a89d15bcb..418bd5acd 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 ------------------------------------- diff --git a/env-example b/env-example index c2bc77689..1d560b2f0 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 fbf927b07..f8d0a136a 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