Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about docker version of server? #27

Open
metya opened this issue Jun 30, 2023 · 5 comments
Open

What about docker version of server? #27

metya opened this issue Jun 30, 2023 · 5 comments

Comments

@metya
Copy link

metya commented Jun 30, 2023

Great work!
But what about creating a docker version of a server-side application?

@kaichaosun
Copy link
Owner

I like your idea!
It would be great if someone know docker/ops better than me to implement it.

@Krystex
Copy link
Contributor

Krystex commented Jul 4, 2023

I'm on it, see pull request #28

@metya
Copy link
Author

metya commented Jul 6, 2023

It's excellent to have Dockerfile to build a container for any use, but how to configure the docker run for server use in docker-compose for example?

I mean, I could write Dockerfile and compose files myself, but I lack understanding of how to run it properly with the localtunnel. For example, what proxy-port mean?
Sorry for the dumb questions, but I can't understand why my setup doesn't work without documentation.

Is it possible to use a localtunnel server without a domain? Just use an IP address. If so, what IP address I should use for running a localtunnel server?

I'm trying to start a server with --domain 0.0.0.0 for example, but it doesn't work. When I'm trying to connect to the server on the IP address of the server, the connection refuses.

I planned to use it in docker with https://github.com/nginx-proxy/nginx-proxy, on my server, there I have configured the domain, but I want to make it work without too.
And there is also the question about proxy-port, cause inside the docker container without --net=host you can publish only several ports outside of the container.

Anyway, I can't even start the localtunnel server without docker. It doesn't connect.

Sorry again for the dumb question :))

@Krystex
Copy link
Contributor

Krystex commented Jul 6, 2023

There are no dumb questions, it's a complex topic! Don't worry.

The Dockerfile is there, but I'm currently in the process of deploying it on my own server. It's also not working for me right now, but I'm figuring it out.

You pretty much need a domain for this application. The whole point is to route different applications with different subdomains.

This is my current stage (not fully working):

You need a image the localtunnel:

docker build -t localtunnel .

And here is my current docker-compose file, but as I said, it's not working right now for me.

services:
  localtunnel:
    image: localtunnel
    container_name: localtunnel
    restart: always
    command: localtunnel server --domain localtunnel.YOURDOMAIN.com --port 3000 --proxy-port 3001
    ports:
      - "3000:3000"
      - "3001:3001"

As far as I understand, the localtunnel client connects to the port (or proxy-port?) and requests a subdomain. After that you can tunnel your local port to your localtunnel server.

I will let you know when my setup is working.

@kaichaosun
Copy link
Owner

Sorry for closing the issue incidentally!

what proxy-port mean?

This is the help info for proxy-port with localtunnel-cli The port to accept user request for proxying..

but I can't understand why my setup doesn't work without documentation

This is a doc for my deployment, hope it's helpful for you.

As far as I understand, the localtunnel client connects to the port (or proxy-port?)

It's port, but definitely need a better name, I'm struggling what to name it at the time.

Thanks you for improving the tool!

@kaichaosun kaichaosun reopened this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants