Update
This commit is contained in:
parent
08e6275c50
commit
f871d5e052
@ -22,7 +22,8 @@ services:
|
|||||||
hostname: eventbus.egommerce.pbiernat.dev
|
hostname: eventbus.egommerce.pbiernat.dev
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=eventbus.egommerce.pbiernat.dev
|
- APP_DOMAIN=eventbus.egommerce.pbiernat.dev
|
||||||
- RABBITMQ_NODENAME=api-eventbus
|
# - RABBITMQ_NODENAME=api-eventbus
|
||||||
|
# - RABBITMQ_USE_LONGNAME=true
|
||||||
# - RABBITMQ_DEFAULT_USER = admin
|
# - RABBITMQ_DEFAULT_USER = admin
|
||||||
# - RABBITMQ_DEFAULT_PASS = passw123
|
# - RABBITMQ_DEFAULT_PASS = passw123
|
||||||
|
|
||||||
|
@ -10,12 +10,12 @@ services:
|
|||||||
- APP_NAME=api-gateway
|
- APP_NAME=api-gateway
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
- API_REGISTRY_REFRESH_INTERVAL=5s
|
- API_REGISTRY_REFRESH_INTERVAL=5s
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
networks:
|
networks:
|
||||||
- api-gateway-network
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-logger-network
|
- api-logger-network
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
||||||
api-registry:
|
api-registry:
|
||||||
image: git.pbiernat.dev/egommerce/api-registry:latest
|
image: git.pbiernat.dev/egommerce/api-registry:latest
|
||||||
@ -33,12 +33,14 @@ services:
|
|||||||
image: git.pbiernat.dev/egommerce/api-eventbus:latest
|
image: git.pbiernat.dev/egommerce/api-eventbus:latest
|
||||||
environment:
|
environment:
|
||||||
# - RABBITMQ_NODENAME=api-eventbus
|
# - RABBITMQ_NODENAME=api-eventbus
|
||||||
|
- RABBITMQ_ERLANG_COOKIE=rabbitmq
|
||||||
- APP_NAME=api-eventbus
|
- APP_NAME=api-eventbus
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
volumes:
|
volumes:
|
||||||
- eventbus_data:/var/lib/rabbitmq
|
- eventbus_data:/var/lib/rabbitmq
|
||||||
- eventbus_logs:/var/log/rabbitmq
|
- eventbus_logs:/var/log/rabbitmq
|
||||||
networks:
|
networks:
|
||||||
|
- api-gateway-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-logger-network
|
- api-logger-network
|
||||||
@ -61,21 +63,30 @@ services:
|
|||||||
|
|
||||||
api-prometheus:
|
api-prometheus:
|
||||||
image: prom/prometheus:latest # FIXME: create private image(prod/dev)...
|
image: prom/prometheus:latest # FIXME: create private image(prod/dev)...
|
||||||
|
user: root
|
||||||
environment:
|
environment:
|
||||||
- APP_NAME=api-prometheus
|
- APP_NAME=api-prometheus
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
networks:
|
networks:
|
||||||
- api-prometheus-network
|
- api-prometheus-network
|
||||||
- api-grafana-network
|
- api-grafana-network
|
||||||
- api-gateway-network
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
- api-cache-network
|
# - api-cache-network
|
||||||
- api-logger-network
|
# - api-logger-network
|
||||||
|
- basket-svc-network
|
||||||
|
- basket-worker-network
|
||||||
- catalog-svc-network
|
- catalog-svc-network
|
||||||
- catalog-worker-network
|
- catalog-worker-network
|
||||||
|
- identity-svc-network
|
||||||
|
- order-svc-network
|
||||||
|
- order-worker-network
|
||||||
|
- pricing-svc-network
|
||||||
|
- pricing-worker-network
|
||||||
|
|
||||||
api-grafana:
|
api-grafana:
|
||||||
image: grafana/grafana-oss:latest # FIXME: create private image(prod/dev)...
|
image: grafana/grafana-oss:latest # FIXME: create private image(prod/dev)...
|
||||||
@ -231,6 +242,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- basket-worker-network
|
- basket-worker-network
|
||||||
- pricing-svc-network
|
- pricing-svc-network
|
||||||
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
- api-logger-network
|
- api-logger-network
|
||||||
@ -246,6 +258,7 @@ services:
|
|||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
networks:
|
networks:
|
||||||
- catalog-worker-network
|
- catalog-worker-network
|
||||||
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
- api-logger-network
|
- api-logger-network
|
||||||
@ -261,6 +274,7 @@ services:
|
|||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
networks:
|
networks:
|
||||||
- pricing-worker-network
|
- pricing-worker-network
|
||||||
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
- api-logger-network
|
- api-logger-network
|
||||||
@ -277,6 +291,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- order-worker-network
|
- order-worker-network
|
||||||
- basket-svc-network
|
- basket-svc-network
|
||||||
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
- api-logger-network
|
- api-logger-network
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
global:
|
global:
|
||||||
scrape_interval: 15s
|
scrape_interval: 10s
|
||||||
evaluation_interval: 15s
|
evaluation_interval: 10s
|
||||||
|
|
||||||
rule_files:
|
# rule_files:
|
||||||
# - "first.rules"
|
# - "first.rules"
|
||||||
# - "second.rules"
|
# - "second.rules"
|
||||||
|
|
||||||
@ -11,13 +11,72 @@ scrape_configs:
|
|||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['localhost:9090']
|
- targets: ['localhost:9090']
|
||||||
|
|
||||||
- job_name: 'api-gateway'
|
- job_name: docker
|
||||||
static_configs:
|
dockerswarm_sd_configs:
|
||||||
- targets: ['api-gateway:8084']
|
- host: unix:///var/run/docker.sock
|
||||||
- job_name: 'api-eventbus'
|
role: tasks
|
||||||
static_configs:
|
relabel_configs:
|
||||||
- targets: ['api-eventbus:8084']
|
- source_labels: [__meta_dockerswarm_service_name, __address__]
|
||||||
|
regex: egommerce_(api-eventbus|api-gateway);(.*):(.*)
|
||||||
|
action: replace
|
||||||
|
replacement: '$2:8084'
|
||||||
|
target_label: __address__
|
||||||
|
# - source_labels: [__meta_dockerswarm_service_name, __address__]
|
||||||
|
# regex: egommerce_api-gateway;(.*):(.*)
|
||||||
|
# action: replace
|
||||||
|
# replacement: '$1:8084'
|
||||||
|
# target_label: __address__
|
||||||
|
# Only keep containers that should be running.
|
||||||
|
- source_labels: [__meta_dockerswarm_service_label_com_docker_stack_namespace]
|
||||||
|
regex: egommerce
|
||||||
|
action: keep
|
||||||
|
- source_labels: [__meta_dockerswarm_task_desired_state]
|
||||||
|
regex: running
|
||||||
|
action: keep
|
||||||
|
# - source_labels: [__meta_dockerswarm_network_name]
|
||||||
|
# regex: ingress
|
||||||
|
# action: keep
|
||||||
|
- source_labels: [__meta_dockerswarm_service_name]
|
||||||
|
action: replace
|
||||||
|
replacement: '$1'
|
||||||
|
target_label: instance
|
||||||
|
# - source_labels: [__meta_dockerswarm_task_desired_state]
|
||||||
|
# regex: running
|
||||||
|
# action: keep
|
||||||
|
|
||||||
- job_name: 'catalog-svc'
|
|
||||||
static_configs:
|
# - job_name: consul
|
||||||
- targets: ['catalog-svc:8084']
|
# consul_sd_configs:
|
||||||
|
# - server: api-registry:8500
|
||||||
|
# services:
|
||||||
|
# - consul
|
||||||
|
# - basket-server
|
||||||
|
# - catalog-server
|
||||||
|
# - identity-svc
|
||||||
|
# - order-svc
|
||||||
|
# - pricing-svc
|
||||||
|
# - consul
|
||||||
|
|
||||||
|
# - job_name: rabbitmq
|
||||||
|
# consul_sd_configs:
|
||||||
|
# - server: api-registry:8500
|
||||||
|
# services:
|
||||||
|
# - api-eventbus
|
||||||
|
# relabel_configs:
|
||||||
|
# - source_labels: ['__meta_consul_service_address']
|
||||||
|
# replacement: '$1:8084'
|
||||||
|
# target_label: __address__
|
||||||
|
# - source_labels: ['__meta_consul_service_port']
|
||||||
|
# replacement: '8084'
|
||||||
|
# target_label: __meta_consul_service_port
|
||||||
|
|
||||||
|
# - job_name: 'api-gateway'
|
||||||
|
# static_configs:
|
||||||
|
# - targets: ['api-gateway:8084']
|
||||||
|
# - job_name: 'api-eventbus'
|
||||||
|
# static_configs:
|
||||||
|
# - targets: ['api-eventbus:8084']
|
||||||
|
|
||||||
|
# - job_name: 'catalog-svc'
|
||||||
|
# static_configs:
|
||||||
|
# - targets: ['catalog-svc:8084']
|
||||||
|
Loading…
Reference in New Issue
Block a user