Some tweaks, tidying up

(cherry picked from commit 1a5bb121f8121c4f68a27abbf25a9a35a1b7c63e)
This commit is contained in:
Neil Alexander 2020-04-08 16:14:58 +01:00 committed by Hilmar Gústafsson
parent 49278740e3
commit 416ce5b53d
2 changed files with 4 additions and 57 deletions

View file

@ -81,6 +81,9 @@ type BaseDendrite struct {
LibP2PPubsub *pubsub.PubSub
}
// NewBaseDendrite creates a new instance to be used by a component.
// The componentName is used for logging purposes, and should be a friendly name
// of the compontent running, e.g. "SyncAPI"
func NewBaseDendrite(cfg *config.Dendrite, componentName string) *BaseDendrite {
common.SetupStdLogging()
common.SetupHookLogging(cfg.Logging, componentName)
@ -101,7 +104,6 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string) *BaseDendrite {
}
//defaultIP6ListenAddr, _ := multiaddr.NewMultiaddr("/ip6/::/tcp/0")
var libp2pdht *dht.IpfsDHT
libp2p, err := libp2p.New(ctx,
libp2p.Identity(privKey),
@ -113,7 +115,7 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string) *BaseDendrite {
if err != nil {
return nil, err
}
//libp2pdht.Validator = LibP2PValidator{}
libp2pdht.Validator = LibP2PValidator{}
r = libp2pdht
return
}),

View file

@ -1,55 +0,0 @@
version: "3.4"
services:
riot:
image: vectorim/riot-web
networks:
- internal
ports:
- "8500:80"
rendezvous:
container_name: libp2p-rendezvous
hostname: rendezvous
image: libp2p/websocket-star-rendezvous
networks:
- internal
ports:
- "443:443"
- "9090:9090"
monolith-1:
container_name: dendrite_monolith-1
hostname: monolith-1
entrypoint: ["bash", "./docker/services/p2p-demo.sh"]
build: ./
volumes:
- ..:/build
- ./build/bin:/build/bin
- ~/go/pkg:/go/pkg
networks:
- internal
ports:
- "8080:8080"
- "8008:8008"
- "8448:8448"
monolith-2:
container_name: dendrite_monolith-2
hostname: monolith-2
entrypoint: ["bash", "./docker/services/p2p-demo.sh"]
build: ./
volumes:
- ..:/build
- ./build/bin:/build/bin
- ~/go/pkg:/go/pkg
- ~/Desktop/dendrite-configs:/etc/dendrite
networks:
- internal
ports:
- "8081:8080"
- "8009:8008"
- "8449:8448"
networks:
internal:
attachable: true