Skip to content

multiple ports #62

@sant527

Description

@sant527

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions