Closed k1s3l closed 2 years ago
It is not supposed to run inside docker. If you run it in the host it should work (without the container name), I use it in that way along with docker.
I wasn't able to simulate, even running the ngrok command directly it didn't work for me using the container name, either inside and outside docker.
If you could explain your docker structure I can try to simulate it again.
I have checked my solution mentioned above, it works) although it is quite crooked, I think it can be refactored.
As a host, we specify a link to the web server container (in my case, this is nginx).
At first I was looking for ngrok under docker. And then I remembered a simple hack using the container name instead of the usual url, it works.
Here is my docker-compose.yml:
https://github.com/k1s3l/shipout-queue/blob/UPDATE-DOCKER/docker-compose-base.yml
Native ngrok command for my case (execute in laravel container):
ngrok http --log stdout nginx:80
I added some options, please update to the new release v2.0.3 and use:
php artisan ngrok --host=nginx
See the advanced usage to know more about the new options.
it's very cool, I can't believe how cool it is! thanks!!! $respect++
Describe the solution you'd like Option --host-header (bool). To install custom address (container name if use docker) without host-header. Simply put, replacing the default localhost
current
feature
fix for NgrokCommand
Describe alternatives you've considered As quickly solve conside
php artisan ngrok --port={container_name}:{port}
. This hack solve my needsUPD: sorry for my broken english