T
Typebot9mo ago
Mavis

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?
5 Replies
Mavis
MavisOP9mo ago
Or if theres another tools than Ngrok that can I use for the same purpose
Albanir Neves
Albanir Neves9mo ago
can you share yout docker-compose file?
Mavis
MavisOP9mo ago
Sure
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
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
Albanir Neves
Albanir Neves9mo ago
BASE_URL=https://<seu_subdominio>.ngrok.io VIEWER_URL=https://<seu_subdominio>.ngrok.io/viewer in .env 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
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;
}
}
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;
}
}
Mavis
MavisOP9mo ago
Thanks, worked

Did you find this page helpful?