From e501771534c0414b9b83f0f5913b6d06c8dd8913 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Mon, 14 May 2018 23:23:52 -0700 Subject: [PATCH] decreased development dockers overhead by just using one phpmyadmin docker --- contrib/util/docker/README.md | 23 +++++++++-------------- docker-compose.yml | 31 +++---------------------------- 2 files changed, 12 insertions(+), 42 deletions(-) diff --git a/contrib/util/docker/README.md b/contrib/util/docker/README.md index f0b8a8897..e4093e4ae 100644 --- a/contrib/util/docker/README.md +++ b/contrib/util/docker/README.md @@ -78,17 +78,14 @@ Run `$ docker ps` to see the OpenEMR and MySQL containers in the following forma ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -6e9cc265cc50 openemr/openemr:flex "./run_openemr.sh" 6 seconds ago Up 3 seconds 0.0.0.0:8080->80/tcp, 0.0.0.0:8090->443/tcp openemr_openemr-7-1_1 -a343e24faa3c couchdb "tini -- /docker-e..." 6 seconds ago Up 4 seconds 4369/tcp, 5984/tcp, 9100/tcp openemr_couchdb_1 -ed8a7e048e01 mariadb:10.3 "docker-entrypoint..." 6 seconds ago Up 4 seconds 3306/tcp openemr_mariadb-dev_1 -c7d035e86ce3 openemr/openemr:flex-edge "./run_openemr.sh" 6 seconds ago Up 4 seconds 0.0.0.0:8081->80/tcp, 0.0.0.0:8091->443/tcp openemr_openemr-7-2_1 -24b71e4526ae mysql:5.7 "docker-entrypoint..." 6 seconds ago Up 5 seconds 3306/tcp openemr_mysql_1 -dee6b2216f6d phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 6 seconds ago Up 4 seconds 0.0.0.0:8102->80/tcp openemr_phpmyadmin-mariadb-dev_1 -5d9a8fcf8a3b mysql:8 "docker-entrypoint..." 6 seconds ago Up 5 seconds 3306/tcp openemr_mysql-dev_1 -4ed037f35c86 phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 6 seconds ago Up 4 seconds 0.0.0.0:8101->80/tcp openemr_phpmyadmin-mysql_1 -7ef17b801312 phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 6 seconds ago Up 5 seconds 0.0.0.0:8103->80/tcp openemr_phpmyadmin-mysql-dev_1 -27eaca4ced97 phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 6 seconds ago Up 5 seconds 0.0.0.0:8100->80/tcp openemr_phpmyadmin-mariadb_1 -e1591a57cfd4 mariadb:10.2 "docker-entrypoint..." 6 seconds ago Up 5 seconds 3306/tcp openemr_mariadb_1 +1008d348a0c9 mariadb:10.2 "docker-entrypoint..." 2 minutes ago Up 2 minutes 3306/tcp openemr_mariadb_1 +664c63569927 mysql:8 "docker-entrypoint..." 2 minutes ago Up 2 minutes 3306/tcp openemr_mysql-dev_1 +6524b0fb4060 openemr/openemr:flex "./run_openemr.sh" 2 minutes ago Up 2 minutes 0.0.0.0:8080->80/tcp, 0.0.0.0:8090->443/tcp openemr_openemr-7-1_1 +fd0cbeaabcc6 openemr/openemr:flex-edge "./run_openemr.sh" 2 minutes ago Up 2 minutes 0.0.0.0:8081->80/tcp, 0.0.0.0:8091->443/tcp openemr_openemr-7-2_1 +577db79a7350 mariadb:10.3 "docker-entrypoint..." 2 minutes ago Up 2 minutes 3306/tcp openemr_mariadb-dev_1 +672444f3ec97 mysql:5.7 "docker-entrypoint..." 2 minutes ago Up 2 minutes 3306/tcp openemr_mysql_1 +145078602bd0 couchdb "tini -- /docker-e..." 2 minutes ago Up 2 minutes 4369/tcp, 5984/tcp, 9100/tcp openemr_couchdb_1 +f72caa088849 phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 2 minutes ago Up 2 minutes 0.0.0.0:8100->80/tcp openemr_phpmyadmin_1 ``` - Note the `NAMES` column is extremely important and how you run docker commands on specific containers. For example, to go into a shell script in the @@ -140,9 +137,7 @@ if you have any questions after reviewing the wiki. PHP 7.1 host machine and port 8081 on the PHP 7.2 host machine. - HTTPS is running on port 443 in the OpenEMR containers and port 8090 on the PHP 7.1 host machine and port 8091 on the PHP 7.2 host machine. -- HTTP is running on port 80 in the PhpMyADMIN containers and port 8100 on the -MariaDB GUI host machine and port 8101 on the MySQL GUI host machine and port -8102 on the MariaDB-dev GUI host machine and port 8103 on the MySQL-dev GUI +- HTTP is running on port 80 in the PhpMyADMIN container and port 8100 on the host machine. - MySQL is running on port 3306 in the MariaDB/MySQL/MariaDB-dev/MySQL-dev containers. diff --git a/docker-compose.yml b/docker-compose.yml index 6b07177f3..2c7c9110e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,11 +20,7 @@ # And when need to tear it down and restart it # 1. docker-compose down -v # 2. docker-compose up -d -# Can see databases via: -# -mariadb via http://localhost:8100 -# -mysql via http://localhost:8101 -# -mariadb-dev via http://localhost:8102 -# -mysql-dev via http://localhost:8103 +# Can see databases via http://localhost:8100 # version: '3.1' services: @@ -72,34 +68,13 @@ services: command: ['mysqld','--character-set-server=utf8'] environment: MYSQL_ROOT_PASSWORD: root - phpmyadmin-mariadb: + phpmyadmin: restart: always image: phpmyadmin/phpmyadmin ports: - 8100:80 environment: - PMA_HOST: mariadb - phpmyadmin-mysql: - restart: always - image: phpmyadmin/phpmyadmin - ports: - - 8101:80 - environment: - PMA_HOST: mysql - phpmyadmin-mariadb-dev: - restart: always - image: phpmyadmin/phpmyadmin - ports: - - 8102:80 - environment: - PMA_HOST: mariadb-dev - phpmyadmin-mysql-dev: - restart: always - image: phpmyadmin/phpmyadmin - ports: - - 8103:80 - environment: - PMA_HOST: mysql-dev + PMA_HOSTS: mariadb,mysql,mariadb-dev,mysql-dev couchdb: restart: always image: couchdb -- 2.11.4.GIT