From d684cb4742b609f305cd6a339c370e1d57f2f95a Mon Sep 17 00:00:00 2001 From: larryeitel Date: Fri, 2 Sep 2016 10:38:15 -0600 Subject: [PATCH 1/4] remove port 22 from php-fpm because of conflict --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 76892f11..26e55ce4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,8 +49,6 @@ services: extra_hosts: # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts) - "dockerhost:10.0.75.1" - ports: - - "22:22" environment: # IMPORTANT: Set the Remote Interpreter entry matching name to `laravel` - PHP_IDE_CONFIG="serverName=laravel" From 7999399e9ad297a735370cdd009a96db1396b826 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 3 Sep 2016 21:23:37 +0800 Subject: [PATCH 2/4] Add pgAdmin container. Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 9 +++++++++ pgadmin/Dockerfile | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 pgadmin/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 76892f11..7b751c0e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -265,6 +265,15 @@ services: # for mariadb container # - "mariadb:db" +### pgAdmin Container ################################## + + pgadmin: + build: ./pgadmin + ports: + - "5050:5050" + links: + - postgres + ### Laravel Application Code Container ###################### volumes_source: diff --git a/pgadmin/Dockerfile b/pgadmin/Dockerfile new file mode 100644 index 00000000..2d34c22b --- /dev/null +++ b/pgadmin/Dockerfile @@ -0,0 +1,5 @@ +FROM fenglc/pgadmin4 + +MAINTAINER Bo-Yi Wu + +EXPOSE 5050 From 07e4bd174ef244f80e17db627ac56b4ef39af46a Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 3 Sep 2016 21:32:02 +0800 Subject: [PATCH 3/4] Add pgAdmin doc. Signed-off-by: Bo-Yi Wu --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2dd91a2..29c9e509 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant. - [Use Redis](#Use-Redis) - [Use Mongo](#Use-Mongo) - [Use phpMyAdmin](#Use-phpMyAdmin) + - [Use pgAdmin](#Use-pgAdmin) - [PHP](#PHP) - [Install PHP Extensions](#Install-PHP-Extensions) - [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version) @@ -134,6 +135,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - **Tools:** - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...) - phpMyAdmin + - pgAdmin >If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :) @@ -251,7 +253,7 @@ docker-compose up -d nginx mysql You can select your own combination of Containers form the list below: -`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`. +`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`. **Note**: `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. @@ -726,7 +728,17 @@ docker-compose up -d mariadb phpmyadmin 2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080` +
+ +### Use pgAdmin +1 - Run the pgAdmin Container (`pgadmin`) with the `docker-compose up` command. Example: + +```bash +docker-compose up -d postgres pgadmin +``` + +2 - Open your browser and visit the localhost on port **5050**: `http://localhost:5050`
From 4013553dbb4c4fa658b66e168dee31b212722373 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 4 Sep 2016 09:04:18 +0800 Subject: [PATCH 4/4] Update postgres share volume path --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 76892f11..245fdd97 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -281,7 +281,7 @@ services: image: tianon/true volumes: - ./data/mysql:/var/lib/mysql - - ./data/postgres:/var/lib/postgres + - ./data/postgres:/var/lib/postgresql/data - ./data/memcached:/var/lib/memcached - ./data/redis:/data - ./data/neo4j:/var/lib/neo4j/data