Eugeny / tabby-web

Tabby Web - an SSH/Telnet/Serial client in your browser.
https://tabby.sh
MIT License
806 stars 120 forks source link

Issue Deploying with docker compose #109

Open charlied57 opened 10 months ago

charlied57 commented 10 months ago

I am having some issues getting tabby-web to deploy correctly using docker-compose, below is my config file. (Replaced variables with dummy data)

services:
    tabby:
        build: .
        restart: always
        ports:
        - 9090:80
        volumes:
        - ./apt-dist:/app-dist
        environment:
        - DATABASE_URL=mysql://tabby:[mysqluserpassword]@192.168.1.210:3306/Tabby
        - PORT=3306
        - DEBUG=False
        - DOCKERIZE_ARGS="-wait tcp://192.168.1.211:9090 -timeout 60s"
        - SOCIAL_AUTH_GITHUB_KEY="[Client ID]"
        - SOCIAL_AUTH_GITHUB_SECRET="[Client Secret]"
        - APP_DIST_STORAGE="file:///app-dist"

I do not have the connection gateway set up but will focus on that after setting up tabby-web.

I am including the GitHub environment variables here while I get it working and will move those later.

I have a MySQL server running at 192.168.1.210 with the user tabby and the DB Tabby Within that DB I can see that the connection is successful because It has been populated with tables. When I boot the container the logs that it produces are:

2023/11/04 15:21:39 Error starting command: `"-wait` - exec: "\"-wait": executable file not found in $PATH
Operations to perform:
  Apply all migrations: admin, app, auth, contenttypes, sessions, social_django
Running migrations:
  No migrations to apply.
  Your models in app(s): 'social_django' have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
[2023-11-04 15:21:42 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2023-11-04 15:21:42 +0000] [1] [INFO] Listening at: http://0.0.0.0:3306 (1)
[2023-11-04 15:21:42 +0000] [1] [INFO] Using worker: sync
[2023-11-04 15:21:42 +0000] [15] [INFO] Booting worker with pid: 15
[2023-11-04 15:21:42 +0000] [16] [INFO] Booting worker with pid: 16
[2023-11-04 15:21:42 +0000] [17] [INFO] Booting worker with pid: 17
[2023-11-04 15:21:42 +0000] [18] [INFO] Booting worker with pid: 18

In the github OAuth settings I have the following (replaced domain name): image

When I navigate to the local URL 192.168.1.211:9090 I receive a Firefox can’t establish a connection to the server at 192.168.1.211:9090.

When I navigate to the URL through the domain name I get the following error: image

The domain is set up through a Cloudflare tunnel that takes my domain name and directs it to 192.168.1.211:9090. I don't have the full callback URL set up through the tunnel assuming that that is caught and forwarded by the domain name.

So my question is, what am I setting up incorrectly? I thought I had set everything up that I needed. I can provide any additional information. Thanks for any help.

chenzhiguo commented 9 months ago

Any body deploy success?

Legot commented 8 months ago

Your callback domain should be the same as what you have in your Homepage URL. This would be a great note to add in the documentation.

dashrandom commented 7 months ago

@charlied57 This isn't a Tabby Web issue. Cloudflare proxies only work on ports 80 and 443. What you need is to throw a reverse proxy in front of Tabby Web that will redirect traffic from domain.name:80/443 to container port 9090 so that ports 80 and 443 can be used.

I suggest looking into nginx reverse proxy or Traefik