I have 3 different containers which are as below 1. UI Container having Vue SPA 2. Backend Container having Spring Boot application 3. MYSql DB container
below is my docker-compose file
version: '3'
services:
mysqldb:
image: mysql:latest
container_name: mysqldb
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: simple-bug
ports:
- "3306:3306"
simple-bug-back:
build: ./..
container_name: simple-bug-back
ports:
- "8082:8082"
restart: on-failure
depends_on:
- mysqldb
environment:
SPRING_PROFILES_ACTIVE: dev
SPRING_DATASOURCE_URL: jdbc:mysql://mysqldb/simple-bug
simple-bug-ui:
build: ./../ui
ports:
- "8080:8080"
depends_on:
- simple-bug-back
Now I am trying to access
in vue application but it is giving net::ERR_NAME_NOT_RESOLVED but if i try the same inside container i.e.
docker exec -it docker_simple-bug-ui_1 sh
and execute curl command inside that for above URL I am getting the response
Can anyone help me what am I missing