FROM mariadb:10.5.17
ENV MYSQL_ROOT_PASSWORD test1357
ENV MYSQL_DATABASE mydb
COPY ./data /var/lib/mysql
EXPOSE 3306
ENTRYPOINT [ "mysqld", "--user=root" ]
docker build -t yong7317/my-mariadb:1.0 .
docker run -d -p 3306:3306 --network ecommerce-network --name mariadb yong7317/my-mariadb:1.0
docker exec -it mariadb /bin/bash
grant all privileges on *.* to 'root'@'%' identified by 'test1357';
flush privileges
- Zookeeper + Kafka Standalone 으로 실행한다.
- docker-compose로 실행
- git clone https://github.com/wurstmeister/kafka-docker
- docker-compose-single-broker.yml 파일을 수정한다.
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
networks:
my-network:
ipv4_address: 172.18.0.100
kafka:
# build: .
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.18.0.101
KAFKA_CREATE_TOPICS: "test:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
networks:
my-network:
ipv4_address: 172.18.0.101
networks:
my-network:
external: true
name: ecommerce-network # 172.18.0.1~
C:\docker-files\kafka-docker> docker-compose -f docker-compose-single-broker.yml up -d
docker run -d -p 9411:9411 --network ecommerce-network --name zipkin openzipkin/zipkin
...
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["prometheus:9090"]
- job_name: 'user-service'
scrape_interval: 15s
metrics_path: '/user-service/actuator/prometheus'
static_configs:
- targets: ['apigateway-service:8000']
- job_name: 'order-service'
scrape_interval: 15s
metrics_path: '/order-service/actuator/prometheus'
static_configs:
- targets: ['apigateway-service:8000']
- job_name: 'apigateway-service'
scrape_interval: 15s
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['apigateway-service:8000']
...
docker run -d -p 9090:9090 --network ecommerce-network --name prometheus -v C:\prometheus-2.40.2.windows-amd64/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
-v : VOLUME 옵션 설정
docker run -d -p 3000:3000 --network ecommerce-network --name grafana grafana/grafana
https://velog.io/@shinmj1207/Apache-Kafka-Kafka-Spring-Boot-연동-오류-모음
https://stackoverflow.com/questions/67763076/connection-to-node-1-127-0-0-19092-could-not-be-established-broker-may-not