Share feedback, ideas and get community help

Updated 3 months ago

Ngrok

Hello, I've installed typebot by a docker-compose.yml file, and I'm trying to use Ngrok to make my development environment public to test, but when I sign-in, the application stops to use the public url created by Ngrok and uses the localhost url instead.

Can someone help me?
M
A
10 comments
Or if theres another tools than Ngrok that can I use for the same purpose
can you share yout docker-compose file?
Sure
Plain Text
version: '3.3'

volumes:
  typebot_db_data:

services:
  typebot-db:
    image: postgres:14-alpine
    restart: always
    volumes:
      - typebot_db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_DB=typebot
      - POSTGRES_PASSWORD=159753
    ports:
      - '5433:5432'

  typebot-builder:
    image: baptistearno/typebot-builder:latest
    restart: always
    depends_on:
      - typebot-db
    ports:
      - '8080:3000'
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    env_file: .env

  typebot-viewer:
    image: baptistearno/typebot-viewer:latest
    restart: always
    ports:
      - '8081:3000'
    env_file: .env
BASE_URL=https://<seu_subdominio>.ngrok.io
VIEWER_URL=https://<seu_subdominio>.ngrok.io/viewer
Check the logs of your services to identify if there are any error messages indicating why the application is reverting to the localhost URL.
docker-compose logs -f
As an alternative, you can set up a reverse proxy (such as Nginx) to forward requests to the correct service using the Ngrok public URL
Plain Text
server {
    listen 80;
    server_name <your_subdomain>.ngrok.io;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
Thanks, worked
Add a reply
Sign up and join the conversation on Discord