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).

  • Unable to connect to Docker Nginx build
  • Tool to automate Docker Swarm
  • Deploy docker container to production preserving mounted volumes
  • Dockerfile php-fpm unmet dependencies
  • Link php docker to host mysql
  • Docker Java memory usage
  • 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

  • How can I check how many containers are running a certain docker image?
  • ssh key generation using dockerfile
  • What execute RUN instruction in exec mode
  • How to set up container using Docker Compose to use a static IP and be accessible outside of VM host?
  • how to access docker registry v2 with curl?
  • Docker container running but browser refuse to connect
  • 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.