From 55028efa88ec71738fdb5c8650f5b99b7e6c0f45 Mon Sep 17 00:00:00 2001 From: Marcos Nils Date: Wed, 17 May 2017 13:02:27 -0300 Subject: [PATCH 1/4] Update development instructions --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cd0d4bf..8e12e43 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ the daemon won't load it automatically. Run the following command for that purpo Start the Docker daemon on your machine and run `docker pull franela/dind`. -1) Install go 1.7.1 with `brew` on Mac or through a package manager. +1) Install go 1.7.1+ with `brew` on Mac or through a package manager. 2) `go get -v -d -t ./...` @@ -35,13 +35,25 @@ Notes: * There is a hard-coded limit to 5 Docker playgrounds per session. After 4 hours sessions are deleted. * If you want to override the DIND version or image then set the environmental variable i.e. `DIND_IMAGE=franela/docker-rc:dind`. Take into account that you can't use standard `dind` images, only [franela](https://hub.docker.com/r/franela/) ones work. + +### Port forwarding +In order for port forwarding to work correctly in development you need to make `*.localhost` to resolve to `127.0.0.1`. That way when you try to access to `pwd10-0-0-1-8080.host1.localhost`, then you're forwarded correctly to your local PWD server. + +You can achieve this by setting up a `dnsmasq` server (you can run it in a docker container also) and adding the following configuration: + +``` +address=/localhost/127.0.0.1 +``` + +### Building the dind image myself. + +If you want to make changes to the `dind` image being used, make your changes to the `Dockerfile.dind` file and then build it using this command: `docker build --build-arg docker_storage_driver=vfs -f Dockerfile.dind -t franela/dind .` ## FAQ ### How can I connect to a published port from the outside world? -~~We're planning to setup a reverse proxy that handles redirection automatically, in the meantime you can use [ngrok](https://ngrok.com) within PWD running `docker run --name supergrok -d jpetazzo/supergrok` then `docker logs --follow supergrok` , it will give you a ngrok URL, now you can go to that URL and add the IP+port that you want to connect to… e.g. if your PWD instance is 10.0.42.3, you can go to http://xxxxxx.ngrok.io/10.0.42.3:8000 (where the xxxxxx is given to you in the supergrok logs).~~ If you need to access your services from outside, use the following URL pattern `http://pwd-..labs.play-with-docker.com` (i.e: http://pwd10_2_135_3-80.host3.labs.play-with-docker.com/). From dced4910d1c31b8edc4abe315491b082f3af1b4b Mon Sep 17 00:00:00 2001 From: Marcos Nils Date: Wed, 17 May 2017 13:08:34 -0300 Subject: [PATCH 2/4] Add dind build instructions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8e12e43..2a8e4a7 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ You can achieve this by setting up a `dnsmasq` server (you can run it in a docke address=/localhost/127.0.0.1 ``` +Don't forget to change your computer default DNS to + ### Building the dind image myself. If you want to make changes to the `dind` image being used, make your changes to the `Dockerfile.dind` file and then build it using this command: `docker build --build-arg docker_storage_driver=vfs -f Dockerfile.dind -t franela/dind .` From caf42df624d3856e979a9267a842ad053cbe84bb Mon Sep 17 00:00:00 2001 From: Marcos Nils Date: Wed, 17 May 2017 13:22:15 -0300 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a8e4a7..6f92fe8 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ You can achieve this by setting up a `dnsmasq` server (you can run it in a docke address=/localhost/127.0.0.1 ``` -Don't forget to change your computer default DNS to +Don't forget to change your computer default DNS to use the dnsmasq server to resolve. ### Building the dind image myself. From 99ea172c30d76b6cfa19e0e7ef61d8bd6f939853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20Vilari=C3=B1o?= Date: Thu, 18 May 2017 18:33:33 -0300 Subject: [PATCH 4/4] Remove close alert when user is signed out (#143) * Remove close browser tab alert when signed out * Remove whitespace line --- www/assets/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/assets/app.js b/www/assets/app.js index a4d9dc0..e90b8d0 100644 --- a/www/assets/app.js +++ b/www/assets/app.js @@ -23,7 +23,7 @@ $scope.newInstanceBtnText = '+ Add new instance'; $scope.deleteInstanceBtnText = 'Delete'; $scope.isInstanceBeingDeleted = false; - + var selectedKeyboardShortcuts = KeyboardShortcutService.getCurrentShortcuts(); angular.element($window).bind('resize', function() { @@ -55,6 +55,8 @@ KeyboardShortcutService.setResizeFunc($scope.resize); $scope.closeSession = function() { + // Remove alert before closing browser tab + window.onbeforeunload = null; $scope.socket.emit('session close'); }