Skip to content

Commit 68ee100

Browse files
add cloudflared tunnel
1 parent 47cff41 commit 68ee100

File tree

6 files changed

+303
-247
lines changed

6 files changed

+303
-247
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66
- add new service for golang
77
- add new service for mailpit
8+
- add new service for cloudflared (cloudflare tunnel like ngrok)
89

910
## 0.1.4
1011

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ cd docker-devbox
6666
docker-compose down -v
6767
```
6868

69+
<hr />
70+
71+
### How-to
72+
73+
- [Cloudflare Tunnel](docs/cloudflare-tunnel.md)

docs/cloudflare-tunnel.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Cloudflare Tunnel (Cloudflared)
2+
3+
From your local docker devbox folder, run the following command to start the tunnel:
4+
5+
```sh
6+
bin/run_cloudflared.sh <ip_or_dns_service:port_service>
7+
```
8+
9+
Where `<ip_service>` is the ip or name of the service you want to expose. For example, to expose the `web` service, run:
10+
11+
```sh
12+
bin/run_cloudflared.sh 172.16.250.10:80
13+
```
14+
15+
See `IP_WEB_SERVER` to get the ip of the web server.
16+
17+
**Remember!**
18+
19+
If you want to expose a service running in your computer instead of a container, use the ip of your computer.
20+
The container do not read "localhost" because is running in a different network (in a container)
21+
22+
Example:
23+
```
24+
bin/run_cloudflared.sh 172.16.250.1:4321
25+
```
26+
27+
See `IP_LOCAL_COMPUTER` to get the ip of the computer

local/bin/run_cloudflared.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
docker-compose run --rm cloudflared tunnel --url "$@"

0 commit comments

Comments
 (0)