Skip to content

Commit

Permalink
Merge pull request #591 from cytopia/ngrok
Browse files Browse the repository at this point in the history
Make Ngrok region configurable via NGROK_REGION env var
  • Loading branch information
cytopia authored Jun 11, 2019
2 parents 3dec841 + 9b5e19c commit 0543f2d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ major versions.



## Unreleased

#### Added
- Make Ngrok region configurable via `NGROK_REGION` env variable


## Bugfix Release v1.0.2 (2019-05-21)

#### Fixed
Expand Down
3 changes: 2 additions & 1 deletion compose/docker-compose.override.yml-all
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ services:
# Ngrok
# -----------------------------------------------------------------------------------------------
ngrok:
image: devilbox/ngrok:0.2
image: devilbox/ngrok:0.3
hostname: ngrok
environment:
- HTTP_TUNNELS=${NGROK_HTTP_TUNNELS:-httpd:httpd:80}
- AUTHTOKEN=${NGROK_AUTHTOKEN:-}
- REGION=${NGROK_REGION:-us}
ports:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_NGROK:-4040}:4040"
networks:
Expand Down
3 changes: 2 additions & 1 deletion compose/docker-compose.override.yml-ngrok
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ services:
# Ngrok
# -----------------------------------------------------------------------------------------------
ngrok:
image: devilbox/ngrok:0.2
image: devilbox/ngrok:0.3
hostname: ngrok
environment:
- HTTP_TUNNELS=${NGROK_HTTP_TUNNELS:-httpd:httpd:80}
- AUTHTOKEN=${NGROK_AUTHTOKEN:-}
- REGION=${NGROK_REGION:-us}
ports:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_NGROK:-4040}:4040"
networks:
Expand Down
23 changes: 13 additions & 10 deletions docs/custom-container/enable-ngrok.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,25 @@ must be copied into the root of the Devilbox git directory.
+-----------------------+-----------------------------------------------------------------------------------------------------+
| Available at | ``http://localhost:4040`` |
+-----------------------+-----------------------------------------------------------------------------------------------------+
| Further configuration | ``NGROK_HTTP_TUNNELS`` and ``NGROK_AUTHTOKEN`` |
| Further configuration | ``NGROK_HTTP_TUNNELS``, ``NGROK_AUTHTOKEN`` and ``NGROK_REGION`` |
+-----------------------+-----------------------------------------------------------------------------------------------------+

Ngrok env variables
-------------------

Additionally the following ``.env`` variables can be created for easy configuration:

+------------------------------+--------------------+----------------------------------------------------------------------+
| Variable | Default value | Description |
+==============================+====================+======================================================================+
| ``HOST_PORT_NGROK`` | ``4040`` | Controls the host port on which Ngrok admin UI will be available at. |
+------------------------------+--------------------+----------------------------------------------------------------------+
| ``NGROK_HTTP_TUNNELS`` | ``httpd:httpd:80`` | Defines one or more Ngrok tunnels (depending on your license) |
+------------------------------+--------------------+----------------------------------------------------------------------+
| ``NGROK_AUTHTOKEN`` | empty | Free or paid license token for Ngrok (can also be empty) |
+------------------------------+--------------------+----------------------------------------------------------------------+
+------------------------------+--------------------+----------------------------------------------------------------------------+
| Variable | Default value | Description |
+==============================+====================+============================================================================+
| ``HOST_PORT_NGROK`` | ``4040`` | Controls the host port on which Ngrok admin UI will be available at. |
+------------------------------+--------------------+----------------------------------------------------------------------------+
| ``NGROK_HTTP_TUNNELS`` | ``httpd:httpd:80`` | Defines one or more Ngrok tunnels (depending on your license) |
+------------------------------+--------------------+----------------------------------------------------------------------------+
| ``NGROK_AUTHTOKEN`` | empty | Free or paid license token for Ngrok (can also be empty) |
+------------------------------+--------------------+----------------------------------------------------------------------------+
| ``NGROK_REGION`` | ``us`` | Choose the region where the ngrok client will connect to host its tunnels. |
+------------------------------+--------------------+----------------------------------------------------------------------------+

NGROK_HTTP_TUNNELS
^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -182,6 +184,7 @@ directory:
echo "NGROK_HTTP_TUNNELS=project1.loc:httpd:80" >> .env
echo "# No license token specified" >> .env
echo "NGROK_AUTHTOKEN=" >> .env
echo "NGROK_REGION=us" >> .env
# Start container
docker-compose up -d php httpd bind ngrok

0 comments on commit 0543f2d

Please sign in to comment.