Sign inSign up

slinkgo/disco

By slinkgo

•Updated almost 2 years ago

[Disco]very service

Image
API management
Internet of things
Web servers
0

7.1K

slinkgo/disco repository overview

Disco⁠ is a discovery service.

⁠Running

docker-compose.yml

version: "3.7"
services:
  disco:
    image: slinkgo/disco:alpine
    container_name: disco
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      - LOGGING_LEVEL=WARNING

⁠Authorization

All requests to service are authorized. Two types of authorization are supported (both can be used together)

  • Bearer auth with JWT (in this case DISCO_SECRET_KEY should be set; this key is used for JWT signature checks)
  • Basic auth (in this case DISCO_USERS should be set in form user1:pass1,user2:pass2)

⁠Configuration

⁠Enable prometheus exporter

DISCO_MONITORING_ENABLED=true

⁠Run service on configured port
DISCO_SERVICE_PORT=8080
⁠Backend to be used

For now only inmem backend is supported. This implies running Disco in single-node mode. For clustered/HA deployments other backends should be implemented (TBD).

DISCO_BACKEND_TYPE="inmem"
⁠Plugin path

For these images should be empty. Defines path to backend plugins.

DISCO_PLUGIN_PATH=""
⁠Client heartbeat interval
DISCO_PING_INTERVAL=1s
⁠Missed heartbeats amount from client to consider it as failing
DISCO_CLIENT_FAILING_THRESHOLD=3
⁠Missed heartbeats amount from client to consider it as down
DISCO_CLIENT_DOWN_THRESHOLD=6
⁠Missed heartbeats amount from client to remove it completely
DISCO_CLIENT_REMOVE_THRESHOLD=9
⁠Limit the number of clients
DISCO_MAX_CLIENTS=1024
⁠Rate limiter config
DISCO_LIMIT_RATE=10
DISCO_LIMIT_BURST=15
⁠Basic auth users
DISCO_USERS="admin:admin,user:user"
⁠Secret key for JWT signature check
DISCO_SECRET_KEY=quite-a-long-secret-key-to-comply-with-internal-requirements
⁠Logging level
LOGGING_LEVEL=WARNING

Available values are:

  • DEBUG
  • INFO
  • NOTICE
  • WARNING
  • ERROR

⁠Generate access token

Disco service supports authorization of incoming requests with JWT access token. To generate it, following command can be used:

docker run --rm -it slinkgo/disco:alpine disco --token [--tenant {TENANT NAME}] [--duration {1825d}]

Token includes tenant name, which allows using Disco in multi-tenant mode (i.e. when different sets of services are registered/discovered on one Disco service).

Tag summary

Content type

Image

Digest

sha256:4aa475662…

Size

10.4 MB

Last updated

almost 2 years ago

docker pull slinkgo/disco