Share feedback, ideas and get community help

Updated 5 months ago

Ngrok

At a glance

A community member has installed Typebot using a Docker Compose file and is trying to use Ngrok to make their development environment public for testing. However, when they sign in, the application stops using the public URL created by Ngrok and reverts to using the localhost URL instead. The community members suggest checking the logs for error messages, using an alternative tool like Nginx as a reverse proxy, and provide a sample Nginx configuration to forward requests to the correct service using the Ngrok public URL. One community member confirms that the suggested solution worked for them.

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