Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a volume so the ngrok settings are persisted #178

Open
wants to merge 1 commit into
base: development-docker-compose-2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bin/dev_command/setup
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ setup() {
return 0;
}

ngrok() {
if [ -z "`${DEV_SUDO} docker volume ls -q -f 'name=dockerdev-ngrok-volume'`" ]; then
echo 'Create ngrok volume in location '${DEV_WORKSPACE_PATH}/ngrok.yml;
mkdir ${DEV_WORKSPACE_PATH}/.ngrok -p
! test -f "${DEV_WORKSPACE_PATH}/.ngrok/ngrok.yml" && echo 'version: 2' > ${DEV_WORKSPACE_PATH}/.ngrok/ngrok.yml
${DEV_SUDO} docker volume create -o 'type=none' -o 'device='${DEV_WORKSPACE_PATH}/.ngrok -o 'o=bind' dockerdev-ngrok-volume
fi

}

feature() {
local name="$1" file="${DEV_WORKPATH}/conf/$2"
local endis="$3" a="";
Expand Down Expand Up @@ -109,6 +119,7 @@ setup() {
suffix;
php;
workspace;
ngrok;
mysql;

feature RabbitMQ rabbitmq;
Expand Down
7 changes: 6 additions & 1 deletion build/dist/docker-compose-ngrok.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
volumes:
dockerdev-ngrok-volume:
external: true

services:
ngrok:
image: ngrok/ngrok

volumes:
- dockerdev-ngrok-volume:/var/lib/ngrok