Skip to content

Commit e51c542

Browse files
committed
try localtunnel
1 parent 7c36a42 commit e51c542

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.hosting/docker-compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
name: github-hosted-app
12
services:
23
app:
34
image: ${REGISTRY:-ghcr.io}/${IMAGE_NAME:-capybara-pro-code/free-github-hosted-app}:${TAG:-latest}
45
env_file: app.env
56
volumes:
67
- ./logs/:/app/logs/
78
tunnel:
8-
image: bitnami/git
9+
image: bitnami/node
910
env_file: tunnel.env
1011
depends_on: [ app ]
1112
volumes:

.hosting/start-tunnel.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ commit_public_url() {
4848

4949
start_tunnel() {
5050
echo "Starting tunnel in background on port [ ${LOCAL_PORT} ]"
51-
ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -T -R "80:$LOCAL_HOST:$LOCAL_PORT" nokey@localhost.run 2>&1 |
52-
tee >(grep -oE --line-buffered '(https:\/\/[[:alnum:]]+\.lhr\.life)' | while IFS= read -r line; do commit_public_url "$line"; done)
51+
npx localtunnel --local-host app --port 8080 |
52+
tee >(grep -oE --line-buffered '(https:\/\/[[:alnum:]\w-]+\.loca\.lt)' | while IFS= read -r line; do commit_public_url "$line"; done)
5353
}
5454
5555
init_git

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The main logic of operation is summarized in the following sequence:
4040

4141
## HTTPS Tunnel:
4242

43-
This template uses https://localhost.run/ to organize a gateway to the backend. You can use any other service like ngrok or something else. However, keep in mind that ngrok allows only one tunnel per region in the free plan, so smooth migration between backend instances is not possible.
43+
This template uses https://github.com/localtunnel/localtunnel to organize a gateway to the backend. You can use any other service like ngrok or something else. However, keep in mind that ngrok allows only one tunnel per region in the free plan, so smooth migration between backend instances is not possible.
4444

4545
## Usage Instructions:
4646

0 commit comments

Comments
 (0)