Accessing host different ports in production

im making an app with Vue.js as frontend and Rails as backend, everything running with docker on development and production.

in development, i can access the services with localhos:8080 (front end) and make request to the backend url with localhost:5678 (rails port).

  • Python docker-py Connection Refused
  • Could not run mvc 6 on Docker
  • Restarting Apache Inside Docker and Keeping Environment Variables
  • Installing on Ubuntu 14.04LTS
  • Access NFS files from Docker
  • Python console within Pycharm in a Ubuntu Virtualbox fails to connect
  • but when i deploy this to production, wich has a domain name(, i can view the front end but cant access the backen, i am unable to make any request.

    i try to make requests to and nothing happens, how can i access the backend port with a domain name?

    ps1: Im sorry if the question is not clear enough, feel free to ask anything
    ps2: I have correctly set up CORS access on the backend
    ps3: if i access the production server via IP, it works correctly, the problem is when i access via the domain name

    Command used to run front-end:

    docker build -t runaterra:ekko .
    docker run -d \
        -w /runaterra-ekko/ \
        -p 80:8080 \
        --name ekko \
        --restart unless-stopped \
        runaterra:ekko npm run dev

    Command used to run backend:

    docker-compose up -d --restart unless-stopped db
    docker-compose build app
    docker-compose run --rm app rake db:migrate
    docker-compose up -d --restart unless-stopped app

  • Docker Ubuntu 16.04 LTS - use tcpdump to capture GRE packets
  • Why won't my container run?
  • Docker Compose remove containers started using docker run
  • Bind-mount volume of different type from guest to host
  • Docker forever in “Docker is starting..” at windows task
  • How to run HHVM in Docker as a daemon?
  • One Solution collect form web for “Accessing host different ports in production”

    You didn’t expose port 5678 of your app to the internet.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.