Olá a todos, encontrei um problema que não consegui solucionar sozinho. Já tentei algumas soluções do fórum, mas ainda persiste o erro. Logo abaixo algumas imagens sobre:
Eu uso o portainer para gerenciar os containers. Ele me mostra assim. Minha estrutura de arquivo está assim:
Meu docker-compose.yaml mudei só as portas, porque rodo alguns serviços nessas portas:
version: '3'
networks:
database:
internal: true
cache:
internal: true
api:
internal: true
monit:
proxy:
services:
redis-forum-api:
image: redis
container_name: redis-forum-api
restart: unless-stopped
expose:
- 6379
networks:
- cache
mysql-forum-api:
image: mysql:5.7
container_name: mysql-forum-api
restart: unless-stopped
environment:
MYSQL_DATABASE: 'forum'
MYSQL_USER: 'forum'
MYSQL_PASSWORD: 'Bk55yc1u0eiqga6e'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_ROOT_HOST: '%'
volumes:
- ./mysql:/docker-entrypoint-initdb.d
expose:
- 3306
networks:
- database
depends_on:
- redis-forum-api
app-forum-api:
build:
context: ./app/
dockerfile: Dockerfile
image: app-forum-api
container_name: app-forum-api
restart: unless-stopped
networks:
- api
- database
- cache
depends_on:
- mysql-forum-api
healthcheck:
test: "curl -sS http://app-forum-api:8080/actuator/health"
interval: 1s
timeout: 30s
retries: 60
proxy-forum-api:
image: nginx
container_name: proxy-forum-api
restart: unless-stopped
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/proxy.conf:/etc/nginx/conf.d/proxy.conf
ports:
- 8089:80
networks:
- proxy
- api
depends_on:
- app-forum-api
prometheus-forum-api:
image: prom/prometheus:latest
container_name: prometheus-forum-api
restart: unless-stopped
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus/prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9089:9090
networks:
- monit
- api
depends_on:
- proxy-forum-api
client-forum-api:
build:
context: ./client/
dockerfile: Dockerfile
image: client-forum-api
container_name: client-forum-api
restart: unless-stopped
networks:
- proxy
depends_on:
- proxy-forum-api
Também peguei as ultimas linhas do log do container:
Hibernate:
select
respostas0_.topico_id as topico_i6_2_0_,
respostas0_.id as id1_2_0_,
respostas0_.id as id1_2_1_,
respostas0_.autor_id as autor_id5_2_1_,
respostas0_.data_criacao as data_cri2_2_1_,
respostas0_.mensagem as mensagem3_2_1_,
respostas0_.solucao as solucao4_2_1_,
respostas0_.topico_id as topico_i6_2_1_,
usuario1_.id as id1_4_2_,
usuario1_.email as email2_4_2_,
usuario1_.nome as nome3_4_2_,
usuario1_.senha as senha4_4_2_
from
resposta respostas0_
left outer join
usuario usuario1_
on respostas0_.autor_id=usuario1_.id
e
respostas0_.topico_id=?