Skip to content

juwenzhang/micro_fastify

Repository files navigation

English Document

  • docker-compose up -d
  • docker-compose build --no-cache
version: '3'
services:
  mysql:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: 451674jh
      MYSQL_DATABASE: microservice_db
    ports:
      - "3306:3306"
  redis:
    image: redis:alpine
    ports:
      - "6379:6379"
  consul:
    image: consul:1.15
    ports:
      - "8500:8500"

Consul 注册服务

  • access link: http://localhost:8500/v1/agent/services
{
    "user-service": {
        "ID": "user-service",
        "Service": "user-service",
        "Tags": [],
        "Meta": {},
        "Port": 3001,
        "Address": "localhost",
        "Weights": {
            "Passing": 1,
            "Warning": 1
        },
        "EnableTagOverride": false,
        "Datacenter": "dc1"
    },
    "user-service1": {
        "ID": "user-service1",
        "Service": "user-service1",
        "Tags": [],
        "Meta": {},
        "Port": 3002,
        "Address": "localhost",
        "Weights": {
            "Passing": 1,
            "Warning": 1
        },
        "EnableTagOverride": false,
        "Datacenter": "dc1"
    }
    ...more micro service detail info 
}

Releases

No releases published

Packages

 
 
 

Contributors