From dcbff8c44acec1f724c2b69c22777ca53ffb2e1c Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 26 Jul 2018 09:37:30 +0200 Subject: [PATCH] Generalize links --- docs/_includes/all.rst | 2 + docs/_includes/links/blogs.rst | 23 ++++++ docs/_includes/links/docker-compose.rst | 7 ++ docs/_includes/links/prerequistes.rst | 35 ++++++++ docs/_includes/links/ssl.rst | 12 +++ docs/_includes/links/tools.rst | 34 +++++++- docs/_includes/links/xdebug.rst | 42 ++++++++++ .../docker-compose-override-yml.rst | 4 +- docs/getting-started/prerequisites.rst | 79 +++++-------------- .../configure-php-xdebug/editor-atom.rst | 2 +- .../configure-php-xdebug/editor-sublime3.rst | 2 +- .../configure-php-xdebug/editor-vscode.rst | 2 +- .../php-xdebug-options.rst | 8 +- docs/intermediate/setup-valid-https.rst | 8 +- docs/maintenance/backup-and-restore-mongo.rst | 16 ++-- docs/maintenance/backup-and-restore-mysql.rst | 29 +++---- docs/maintenance/backup-and-restore-pgsql.rst | 21 ++--- docs/support/blogs-videos-and-use-cases.rst | 25 +++--- 18 files changed, 227 insertions(+), 124 deletions(-) create mode 100644 docs/_includes/links/blogs.rst create mode 100644 docs/_includes/links/prerequistes.rst diff --git a/docs/_includes/all.rst b/docs/_includes/all.rst index 81a5b620..dd5767c9 100644 --- a/docs/_includes/all.rst +++ b/docs/_includes/all.rst @@ -22,6 +22,7 @@ ============================================================ .. include:: /_includes/links/apps.rst +.. include:: /_includes/links/blogs.rst .. include:: /_includes/links/dns.rst .. include:: /_includes/links/documentation.rst .. include:: /_includes/links/docker.rst @@ -29,6 +30,7 @@ .. include:: /_includes/links/docker-images.rst .. include:: /_includes/links/examples.rst .. include:: /_includes/links/git.rst +.. include:: /_includes/links/prerequistes.rst .. include:: /_includes/links/ssh.rst .. include:: /_includes/links/ssl.rst .. include:: /_includes/links/tools.rst diff --git a/docs/_includes/links/blogs.rst b/docs/_includes/links/blogs.rst new file mode 100644 index 00000000..56f3bb1f --- /dev/null +++ b/docs/_includes/links/blogs.rst @@ -0,0 +1,23 @@ +.. |ext_lnk_blog_deliciousbrains| raw:: html + + + Using Devilbox For Local WordPress Development In Docker + + +.. |ext_lnk_blog_moritzkanzler| raw:: html + + + Devilbox: Lokaler Webserver mit Apache, PHP und MySQL im Docker Container + + +.. |ext_lnk_blog_joomla_pr_testing_platform| raw:: html + + + PR Testing Platform + + +.. |ext_lnk_blog_joomla_gsoc2017| raw:: html + + + Google Summer of Code 2017 + diff --git a/docs/_includes/links/docker-compose.rst b/docs/_includes/links/docker-compose.rst index 46a905b8..52b7a56e 100644 --- a/docs/_includes/links/docker-compose.rst +++ b/docs/_includes/links/docker-compose.rst @@ -79,3 +79,10 @@ Docker Compose: extra_hosts + +.. |ext_lnk_docker_compose_extends| raw:: html + + + Docker Compose: Share Compose configurations between files and projects + + diff --git a/docs/_includes/links/prerequistes.rst b/docs/_includes/links/prerequistes.rst new file mode 100644 index 00000000..5a9910d6 --- /dev/null +++ b/docs/_includes/links/prerequistes.rst @@ -0,0 +1,35 @@ +.. |ext_lnk_prereq_docker_lin| raw:: html + + + Docker + + +.. |ext_lnk_prereq_docker_mac| raw:: html + + + Docker for Mac + + +.. |ext_lnk_prereq_docker_mac_tb| raw:: html + + + Docker Toolbox + + +.. |ext_lnk_prereq_docker_win| raw:: html + + + Docker for Windows + + +.. |ext_lnk_prereq_docker_win_tb| raw:: html + + + Docker Toolbox + + +.. |ext_lnk_prereq_docker_win_ee| raw:: html + + + Docker EE + diff --git a/docs/_includes/links/ssl.rst b/docs/_includes/links/ssl.rst index 8f27dc05..a4ea3b63 100644 --- a/docs/_includes/links/ssl.rst +++ b/docs/_includes/links/ssl.rst @@ -9,3 +9,15 @@ Chrome & Firefox now force .dev domains to HTTPS via preloaded HSTS + +.. |ext_lnk_ssl_certificate_authority| raw:: html + + + Certificate Authority + + +.. |ext_lnk_ssl_gfi_root_cert_guide| raw:: html + + + GFI Root Certificate guide + diff --git a/docs/_includes/links/tools.rst b/docs/_includes/links/tools.rst index d03532f1..529752a3 100644 --- a/docs/_includes/links/tools.rst +++ b/docs/_includes/links/tools.rst @@ -11,7 +11,7 @@ .. |ext_lnk_tool_linuxbrew| raw:: html - + Linux brew @@ -87,6 +87,24 @@ MD linter +.. |ext_lnk_tool_mongodump| raw:: html + + + mongodump + + +.. |ext_lnk_tool_mongorestore| raw:: html + + + mongorestore + + +.. |ext_lnk_tool_mysqldump| raw:: html + + + mysqldump + + .. |ext_lnk_tool_mysqldump_secure| raw:: html @@ -123,6 +141,18 @@ PHP Code Beautifier and Fixer +.. |ext_lnk_tool_pg_dump| raw:: html + + + pg_dump + + +.. |ext_lnk_tool_pgsql_restore| raw:: html + + + pgsql + + .. |ext_lnk_tool_photon| raw:: html @@ -131,7 +161,7 @@ .. |ext_lnk_tool_sass| raw:: html - + Sass diff --git a/docs/_includes/links/xdebug.rst b/docs/_includes/links/xdebug.rst index 53a88d01..c072665a 100644 --- a/docs/_includes/links/xdebug.rst +++ b/docs/_includes/links/xdebug.rst @@ -1,3 +1,9 @@ +.. + ============================================================ + Xdebug configuration + ============================================================ + + .. |ext_lnk_github_devilbox_xdebug_on_mac| raw:: html @@ -9,3 +15,39 @@ Xdebug on MacOS (original) + +.. |ext_lnk_xdebug_settings| raw:: html + + + Xdebug: all settings + + +.. |ext_lnk_xdebug_remote_debugging| raw:: html + + + Xdebug: remote debugging + + + +.. + ============================================================ + Xdebug IDE/editor configuration + ============================================================ + +.. |ext_lnk_xdebug_ide_atom_php_debug| raw:: html + + + php-debug + + +.. |ext_lnk_xdebug_ide_sublime_xdebug_client| raw:: html + + + Xdebug client + + +.. |ext_lnk_xdebug_ide_vscode_php_debug| raw:: html + + + vscode-php-debug + diff --git a/docs/configuration-files/docker-compose-override-yml.rst b/docs/configuration-files/docker-compose-override-yml.rst index dd961b8a..57b1112b 100644 --- a/docs/configuration-files/docker-compose-override-yml.rst +++ b/docs/configuration-files/docker-compose-override-yml.rst @@ -1,3 +1,5 @@ +.. include:: /_includes/all.rst + .. _docker_compose_override_yml: *************************** @@ -14,7 +16,7 @@ By default, this file does not exist and you must create it. You can either copy .. contents:: :local: -.. seealso:: Official Docker documentation: `Share Compose configurations between files and projects `_ +.. seealso:: |ext_lnk_docker_compose_extends| Create docker-compose.override.yml diff --git a/docs/getting-started/prerequisites.rst b/docs/getting-started/prerequisites.rst index e34857bc..e8a12480 100644 --- a/docs/getting-started/prerequisites.rst +++ b/docs/getting-started/prerequisites.rst @@ -22,64 +22,27 @@ Supported host OS The Devilbox runs on all major operating systems which provide ``Docker`` and ``Docker Compose``. See the matrix below for supported versions: -+----------------+---------------------+---------------------+-------------+ -| OS | Version | Type | Recommended | -+================+=====================+=====================+=============+ -| |img_logo_lin| | Any | |tbl_docker_lin| | yes | -+----------------+---------------------+---------------------+-------------+ -| | | | | -+----------------+---------------------+---------------------+-------------+ -| |img_logo_mac| | Any | |tbl_docker_mac| | yes | -| | +---------------------+-------------+ -| | | |tbl_docker_tb_mac| | | -+----------------+---------------------+---------------------+-------------+ -| | | | | -+----------------+---------------------+---------------------+-------------+ -| |img_logo_win| | Windows 7 | |tbl_docker_tb_win| | | -| +---------------------+---------------------+-------------+ -| | Windows 10 | |tbl_docker_win| | yes | -| | +---------------------+-------------+ -| | | |tbl_docker_tb_win| | | -| +---------------------+---------------------+-------------+ -| | Windows Server 2016 | |tbl_docker_win_ee| | yes | -+----------------+---------------------+---------------------+-------------+ - -.. |tbl_docker_lin| raw:: html - - - Docker - - -.. |tbl_docker_mac| raw:: html - - - Docker for Mac - - -.. |tbl_docker_tb_mac| raw:: html - - - Docker Toolbox - - -.. |tbl_docker_win| raw:: html - - - Docker for Windows - - -.. |tbl_docker_tb_win| raw:: html - - - Docker Toolbox - - -.. |tbl_docker_win_ee| raw:: html - - - Docker EE - - ++----------------+---------------------+--------------------------------+-------------+ +| OS | Version | Type | Recommended | ++================+=====================+================================+=============+ +| |img_logo_lin| | Any | |ext_lnk_prereq_docker_lin| | yes | ++----------------+---------------------+--------------------------------+-------------+ +| | | | | ++----------------+---------------------+--------------------------------+-------------+ +| |img_logo_mac| | Any | |ext_lnk_prereq_docker_mac| | yes | +| | +--------------------------------+-------------+ +| | | |ext_lnk_prereq_docker_mac_tb| | | ++----------------+---------------------+--------------------------------+-------------+ +| | | | | ++----------------+---------------------+--------------------------------+-------------+ +| |img_logo_win| | Windows 7 | |ext_lnk_prereq_docker_win_tb| | yes | +| +---------------------+--------------------------------+-------------+ +| | Windows 10 | |ext_lnk_prereq_docker_win| | yes | +| | +--------------------------------+-------------+ +| | | |ext_lnk_prereq_docker_win_tb| | | +| +---------------------+--------------------------------+-------------+ +| | Windows Server 2016 | |ext_lnk_prereq_docker_win_ee| | yes | ++----------------+---------------------+--------------------------------+-------------+ Required software diff --git a/docs/intermediate/configure-php-xdebug/editor-atom.rst b/docs/intermediate/configure-php-xdebug/editor-atom.rst index 8877ded0..c80b7d10 100644 --- a/docs/intermediate/configure-php-xdebug/editor-atom.rst +++ b/docs/intermediate/configure-php-xdebug/editor-atom.rst @@ -52,7 +52,7 @@ Configuration **1. Install php-debug for Atom** - .. seealso:: `php-debug `_ + .. seealso:: |ext_lnk_xdebug_ide_atom_php_debug| **2. Configure path mapping in config.cson or ui** diff --git a/docs/intermediate/configure-php-xdebug/editor-sublime3.rst b/docs/intermediate/configure-php-xdebug/editor-sublime3.rst index d0f6544c..c7add5e6 100644 --- a/docs/intermediate/configure-php-xdebug/editor-sublime3.rst +++ b/docs/intermediate/configure-php-xdebug/editor-sublime3.rst @@ -54,7 +54,7 @@ Configuration Use Sublime's Package Control to search for and install ``Xdebug Client``. - .. seealso:: `Xdebug Client `_ + .. seealso:: |ext_lnk_xdebug_ide_sublime_xdebug_client| **2. Configure Xdebug.sublime-settings** diff --git a/docs/intermediate/configure-php-xdebug/editor-vscode.rst b/docs/intermediate/configure-php-xdebug/editor-vscode.rst index 075f94e1..6fb4b7d8 100644 --- a/docs/intermediate/configure-php-xdebug/editor-vscode.rst +++ b/docs/intermediate/configure-php-xdebug/editor-vscode.rst @@ -53,7 +53,7 @@ Configuration **1. Install vscode-php-debug** - .. seealso:: `vscode-php-debug `_ + .. seealso:: |ext_lnk_xdebug_ide_vscode_php_debug| **2. Configure launch.json** diff --git a/docs/intermediate/configure-php-xdebug/php-xdebug-options.rst b/docs/intermediate/configure-php-xdebug/php-xdebug-options.rst index cd952329..bd69ee0f 100644 --- a/docs/intermediate/configure-php-xdebug/php-xdebug-options.rst +++ b/docs/intermediate/configure-php-xdebug/php-xdebug-options.rst @@ -29,7 +29,7 @@ Consider the following ``xdebug.ini`` as an example: xdebug.idekey="PHPSTORM" xdebug.remote_log=/var/log/php/xdebug.log -.. seealso:: https://xdebug.org/docs/all_settings +.. seealso:: |ext_lnk_xdebug_settings| default_enable -------------- @@ -59,9 +59,9 @@ this setting unchanged. remote_autostart ---------------- Normally you need to use a specific HTTP GET/POST variable to start remote debugging (see -`Remote Debugging `_). When this setting is set to -``1``, Xdebug will always attempt to start a remote debugging session and try to connect to a client, -even if the GET/POST/COOKIE variable was not present. +|ext_lnk_xdebug_remote_debugging|). When this setting is set to ``1``, Xdebug will always attempt +to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE +variable was not present. idekey ------ diff --git a/docs/intermediate/setup-valid-https.rst b/docs/intermediate/setup-valid-https.rst index 6cc480bb..8729b830 100644 --- a/docs/intermediate/setup-valid-https.rst +++ b/docs/intermediate/setup-valid-https.rst @@ -1,3 +1,5 @@ +.. include:: /_includes/all.rst + .. _setup_valid_https: ***************** @@ -30,8 +32,8 @@ Certificate Authority --------------------- When the Devilbox starts up for the first time, it will generate a -`Certificate Authority `_ and will store its -public and private key in ``./ca/`` within the Devilbox git directory. +|ext_lnk_ssl_certificate_authority| and will store its public and private key in ``./ca/`` within +the Devilbox git directory. The keys are only generated if they don't exist and kept permanently if you don't delete them manually, i.e. they are not overwritten. @@ -67,7 +69,7 @@ Import the CA into your browser Importing the CA into the browser is also recommended and required for the Devilbox intranet page to work properly. You may also import the CA into your Operating System's Keystore. Information on that - is available at `GFI Root Certificate guide `_ + is available at |ext_lnk_ssl_gfi_root_cert_guide|. Chrome / Chromium ----------------- diff --git a/docs/maintenance/backup-and-restore-mongo.rst b/docs/maintenance/backup-and-restore-mongo.rst index 0060fa5b..3aca06f8 100644 --- a/docs/maintenance/backup-and-restore-mongo.rst +++ b/docs/maintenance/backup-and-restore-mongo.rst @@ -1,3 +1,5 @@ +.. include:: /_includes/all.rst + .. _backup_and_restore_mongo: ************************** @@ -24,8 +26,8 @@ Backup mongodump --------- -`mongodump `_ is bundled with -each PHP container and reay to use. To backup all databases follow the below listed example: +|ext_lnk_tool_mongodump| is bundled with each PHP container and reay to use. +To backup all databases follow the below listed example: .. code-block:: bash @@ -38,9 +40,6 @@ each PHP container and reay to use. To backup all databases follow the below lis # Run mongodump devilbox@php-7.1.6 in /shared/httpd $ mongodump --out /shared/backups/mongo -To find out more about the configuration and options of mongodump, visit its project page under: -https://docs.mongodb.com/manual/reference/program/mongodump. - Restore ======= @@ -48,8 +47,8 @@ Restore mongorestore ------------ -`mongorestore `_ is bundled with -each PHP container and ready to use. To restore all MongoDB databases follow the below listed example: +|ext_lnk_tool_mongorestore| is bundled with each PHP container and ready to use. +To restore all MongoDB databases follow the below listed example: .. code-block:: bash @@ -61,6 +60,3 @@ each PHP container and ready to use. To restore all MongoDB databases follow the # Start the restore/import from /shared/backups/mongo devilbox@php-7.1.6 in /shared/httpd $ mongorestore /shared/backups/mongo - -To find out more about the configuration and options of mongorestore, visit its project page under: -https://docs.mongodb.com/manual/reference/program/mongorestore/. diff --git a/docs/maintenance/backup-and-restore-mysql.rst b/docs/maintenance/backup-and-restore-mysql.rst index 3a3093a4..bed6f601 100644 --- a/docs/maintenance/backup-and-restore-mysql.rst +++ b/docs/maintenance/backup-and-restore-mysql.rst @@ -1,3 +1,5 @@ +.. include:: /_includes/all.rst + .. _backup_and_restore_mysql: ************************ @@ -30,8 +32,8 @@ dump date, dump options as well as the server version it came from. Mysqldump-secure ---------------- -`mysqldump-secure `_ is bundled, setup and ready to use in every -PHP container. You can run it without any arguments and it will dump each available database as a +|ext_lnk_tool_mysqldump_secure| is bundled, setup and ready to use in every PHP container. +You can run it without any arguments and it will dump each available database as a separated compressed file. Backups will be located in ``./backups/mysql/`` inside the Devilbox git directory or in ``/shared/backups/mysql/`` inside the PHP container. @@ -185,8 +187,8 @@ occured during backups. Let's have a look at one of them: mysqldump --------- -`mysqldump `_ is bundled with each PHP -container and ready to use. To backup a database named ``my_db_name`` follow the below listed +|ext_lnk_tool_mysqldump| is bundled with each PHP container and ready to use. +To backup a database named ``my_db_name`` follow the below listed example which shows you how to do that from within the PHP container: .. code-block:: bash @@ -201,26 +203,21 @@ example which shows you how to do that from within the PHP container: devilbox@php-7.1.6 in /shared/httpd $ mysqldump -h mysql -u root -p my_db_name > /shared/backups/mysql/my_db_name.sql To find out more about the configuration and options of mysqldump, visit its project page under: -https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html +|ext_lnk_tool_mysqldump| phpMyAdmin ---------- -If you do not like to use the command line for backups, you can use -`phpMyAdmin `_. It comes bundled with the devilbox intranet. - -To find out more about the usage of phpMyAdmin, visit its project page under: -https://www.phpmyadmin.net. +If you do not like to use the command line for backups, you can use |ext_lnk_tool_phpmyadmin|. +It comes bundled with the devilbox intranet. Adminer ------- -If you do not like to use the command line for backups, you can use -`Adminer `_. It comes bundled with the devilbox intranet. - -To find out more about the usage of Adminer, visit its project page under: https://www.adminer.org. +If you do not like to use the command line for backups, you can use |ext_lnk_tool_adminer| . +It comes bundled with the devilbox intranet. Restore @@ -281,7 +278,7 @@ binary. Here are a few examples for different file types: phpMyAdmin ---------- -`phpMyAdmin `_ supports importing many different formats out-of-the-box. +|ext_lnk_tool_phpmyadmin| supports importing many different formats out-of-the-box. Simply select the compressed or uncompressed file and press ``Go`` in the import section of the web interface. @@ -289,6 +286,6 @@ the web interface. Adminer ------- -`Adminer `_ supports importing of plain (``*.sql``) or gzipped compressed +|ext_lnk_tool_adminer| supports importing of plain (``*.sql``) or gzipped compressed (``*.sql.gz``) files out-of-the-box. Simply select the compressed or uncompressed file and press ``Execute`` in the import section of the web interface. diff --git a/docs/maintenance/backup-and-restore-pgsql.rst b/docs/maintenance/backup-and-restore-pgsql.rst index 56a8a3df..d16f22c2 100644 --- a/docs/maintenance/backup-and-restore-pgsql.rst +++ b/docs/maintenance/backup-and-restore-pgsql.rst @@ -1,3 +1,5 @@ +.. include:: /_includes/all.rst + .. _backup_and_restore_pgsql: ***************************** @@ -24,9 +26,8 @@ Backup pg_dump ------- -`pg_dump `_ is bundled with -each PHP container and reay to use. To backup a database named ``my_db_name`` follow the below -listed example: +|ext_lnk_tool_pg_dump| is bundled with each PHP container and reay to use. +To backup a database named ``my_db_name`` follow the below listed example: .. code-block:: bash @@ -39,17 +40,11 @@ listed example: # Run pg_dump devilbox@php-7.1.6 in /shared/httpd $ pg_dump -h pgsql -U postgres -W my_db_name > /shared/backups/pgsql/my_db_name.sql -To find out more about the configuration and options of pg_dump, visit its project page under: -https://www.postgresql.org/docs/current/static/backup-dump.html. - - Adminer ------- -If you do not like to use the command line for backups, you can use -`Adminer `_. It comes bundled with the devilbox intranet. - -To find out more about the usage of Adminer, visit its project page under: https://www.adminer.org. +If you do not like to use the command line for backups, you can use |ext_lnk_tool_adminer|. +It comes bundled with the devilbox intranet. Restore @@ -59,7 +54,7 @@ psql ---- In order to restore or import PostgreSQL databases on the command line, you need to use -`psql `_. +|ext_lnk_tool_pgsql_restore|. Here are a few examples for different file types: ``*.sql`` file @@ -108,6 +103,6 @@ Here are a few examples for different file types: Adminer ------- -`Adminer `_ supports importing of plain (``*.sql``) or gzipped compressed +|ext_lnk_tool_adminer| supports importing of plain (``*.sql``) or gzipped compressed (``*.sql.gz``) files out-of-the-box. Simply select the compressed or uncompressed file and press ``Execute`` in the import section of the web interface. diff --git a/docs/support/blogs-videos-and-use-cases.rst b/docs/support/blogs-videos-and-use-cases.rst index b13f8c88..46f660f4 100644 --- a/docs/support/blogs-videos-and-use-cases.rst +++ b/docs/support/blogs-videos-and-use-cases.rst @@ -1,3 +1,5 @@ +.. include:: /_includes/all.rst + .. _blogs_videos_and_use_cases: *************************** @@ -19,17 +21,13 @@ Blog posts The following shows a list of blogs that give a nice and objective introduction to the Devilbox. -+------------------------------------------------------------------------------+----------+ -| Title | Language | -+==============================================================================+==========+ -| `Using Devilbox For Local WordPress Development In Docker`_ | English | -+------------------------------------------------------------------------------+----------+ -| `Devilbox: Lokaler Webserver mit Apache, PHP und MySQL im Docker Container`_ | German | -+------------------------------------------------------------------------------+----------+ - -.. _`Using Devilbox For Local WordPress Development In Docker`: https://deliciousbrains.com/devilbox-local-wordpress-development-docker - -.. _`Devilbox: Lokaler Webserver mit Apache, PHP und MySQL im Docker Container`: https://blog.moritzkanzler.de/devilbox-lokaler-webserver-mit-apache-php-und-mysql-im-docker-container/ ++---------------------------------+----------+ +| Title | Language | ++=================================+==========+ +| |ext_lnk_blog_deliciousbrains| | English | ++---------------------------------+----------+ +| |ext_lnk_blog_moritzkanzler| | German | ++---------------------------------+----------+ Use-cases @@ -38,9 +36,8 @@ Use-cases Joomla's Continuous Integration -------------------------------- -Joomla has created a `PR Testing Platform `_ -as their `Google Summer of Code 2017 `_ -project using a modified version of the Devilbox. +Joomla has created a |ext_lnk_blog_joomla_pr_testing_platform| as their +|ext_lnk_blog_joomla_gsoc2017| project using a modified version of the Devilbox. Add your story