docker-ngrok icon indicating copy to clipboard operation
docker-ngrok copied to clipboard

multiple ports

Open sant527 opened this issue 3 years ago • 1 comments

How can i add multiple ports

I have nodejs and django application

  webapp:
    image: "python-node-buster:nikolaik-python3.7-nodejs15"
    ports:
      - "8001:8000"
    command:
      - python manage.py runserver --noreload 0.0.0.0:8000
    stdin_open: true   # Add this line into your service
    tty: true   # Add this line into your service
    networks:
      - django_network


  node:
    image: "python-node-buster:nikolaik-python3.7-nodejs15"
    ports:
      - "3000:3000"
    stdin_open: true  #https://stackoverflow.com/a/60902143/2897115
    networks:
      - node_network


  ngrok:
    image: wernight/ngrok:latest
    ports:
      - 4040:4040
    environment:
      NGROK_PROTOCOL: http
      NGROK_PORT: node:3000  <--- HOW TO ADD FOR MULTIPLE PORTS HERE
      NGROK_AUTH: ""
    depends_on:
      - node
      - webapp
    networks:
      - node_network
      - django_network

networks:
  django_network:
    driver: bridge
  node_network:
    driver: bridge

I want to access 8001 also how can i do that

sant527 avatar Apr 30 '21 06:04 sant527

Similar question, I think. Is it possible to define in a config file multiple tunnels not just to localhost but also other local servers and then start them all (i.e. 'ngrok start --all')?

brossow avatar Jul 09 '21 04:07 brossow