Ao tentar rodar, pode ser que você tenha esse erro:
➜ conteudo_01 git:(main) ✗ docker-compose up -d
[+] Running 0/5
⠙ prometheus-forum-api Pulling 2.1s
⠙ grafana-forum-api Pulling 2.1s
⠋ redis-forum-api Pulling 2.1s
⠋ mysql-forum-api Pulling 2.1s
⠋ proxy-forum-api Pulling 2.1s
no matching manifest for linux/arm64/v8 in the manifest list entries
Para corrigir, alterei algumas imagens compatíveis, rodei o dokcer-compose build e depois o docker-compose up -d
networks:
database:
internal: true
cache:
internal: true
api:
internal: true
monit:
proxy:
services:
redis-forum-api:
image: redis:6.2-alpine
container_name: redis-forum-api
restart: unless-stopped
expose:
- 6379
networks:
- cache
mysql-forum-api:
image: mysql:8.0
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
ulimits:
nofile:
soft: 1048576
hard: 1048576
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
ulimits:
nofile:
soft: 1048576
hard: 1048576
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:
- 80: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:
- 9090:9090
networks:
- monit
- api
depends_on:
- proxy-forum-api
user: root
grafana-forum-api:
image: grafana/grafana
container_name: grafana-forum-api
volumes:
- ./grafana:/var/lib/grafana
restart: unless-stopped
ports:
- 3000:3000
networks:
- monit
depends_on:
- prometheus-forum-api
user: root
client-forum-api:
build:
context: ./client/
dockerfile: Dockerfile
image: client-forum-api
container_name: client-forum-api
restart: unless-stopped
networks:
- proxy
depends_on:
- grafana-forum-api