bore icon indicating copy to clipboard operation
bore copied to clipboard

docker-compose.yml

Open holtwick opened this issue 11 months ago • 5 comments

I made your great tool work on a https://github.com/NginxProxyManager/nginx-proxy-manager driven virtual server. Maybe you'd like to add some of the following to your project:

  1. Copy or clone this repo to the server
  2. Modify Dockerfile to run in server mode. Basically I changed the last line to ENTRYPOINT ["./bore", "server", "--min-port=8080", "--max-port=8080"]
  3. Add a docker-compose.yml and build and start it like docker compose up -d
# docker-compose.yml

version: '3'

services:
  tunnel:
    build: .
    restart: unless-stopped
    ports:
      - '7835:7835'

networks:
  default:
    external: true
    name: proxy

The networks line are specific to the proxy.

The port is required to get the protocol working.

In the proxy I configured like this:

20240301-203911-capture-holtwick@2x

Now with something like bore local 8080 --to tunnel.example.com I can fire it up on the client. HTTPS also works fine if configured in the Nginx Proxy Manager.

holtwick avatar Mar 01 '24 19:03 holtwick

Instead of rebuild the image you guys can try to use the command settings, it work perfect for me

version: '3'
services:
    tunnel:
        command: 'server --min-port 3333 --max-port 4444'
        image: ekzhang/bore
        ports:
            - '7835:7835'
networks:
    default:
        external: true
        name: proxy

lukenvn avatar Mar 12 '24 04:03 lukenvn

Awesome, this way it is even simpler to use. Thanks!

Just this line:

command: 'server --min-port 3333 --max-port 4444'

needs to change to something like this:

command: 'server --min-port 8080 --max-port 8080'

in order to get a predictable port for the proxy, that will than be mapped to the public HTTPS port 443.


I still continue to use the self building script, because the machine I'm using it on has an ARM CPU.

holtwick avatar Mar 12 '24 07:03 holtwick

I am confused a little bit with the network part. What do I need to have for the network?

Error that I got: services.tunnel.networks.default Additional property external is not allowed

alanmilinovic avatar Mar 15 '24 11:03 alanmilinovic

The networks part is only if you use it with https://github.com/NginxProxyManager/nginx-proxy-manager

See this for details: https://nginxproxymanager.com/advanced-config/#best-practice-use-a-docker-network

holtwick avatar Mar 15 '24 13:03 holtwick

https://github.com/ricardoapaes/bore-server

I implemented this solution using nginx, then take a look.

ricardoapaes avatar Apr 24 '24 19:04 ricardoapaes