I have a container running a Nuxt.js (Vue.js) app, defined by docker_composes.yml
:
version: '3'
services:
vue:
build: .
image: registry.gitlab.com/something/app:${TAG}
environment:
- apiPath="http://localhost:5000/"
- filePath="http://localhost:3000/"
ports:
- "${EXPOSED_PORT:-80}:${NUXT_PORT:-3000}"
restart: always
The app is a frontend. I am running the backend on localhost, on port 5000
.
When the containerized app tries to connect to http://localhost:5000/
it fails.
What are my options?
I don't want to put the backend into the docker_composes.yml
and connect them by link. If it's the only option though, I will.