diff --git a/Makefile b/Makefile index f288ba3..b88799f 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,13 @@ build: clean run: bee run -gendoc=true -downdoc=true -dev: - bee generate routers && HTTPPORT=8093 bee run -gendoc=true -downdoc=true +purge: + lsof -t -i:8093 | xargs kill | true + +run-dev: + bee generate routers && bee run -gendoc=true -downdoc=true -runmode=prod + +dev: purge run-dev debug: bee run -downdebug -gendebug @@ -27,4 +32,4 @@ publish-registry: all: docker publish-kind publish-registry -.PHONY: build run clean docker publish-kind publish-registry \ No newline at end of file +.PHONY: build run clean docker publish-kind publish-registry diff --git a/conf/app.conf b/conf/app.conf index d595eb9..d4bde57 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -1,5 +1,5 @@ appname = oc-peer -httpport = 8080 +httpport = 8093 runmode = dev autorender = false copyrequestbody = true diff --git a/controllers/version.go b/controllers/version.go index 6fa3e9c..c55ec6b 100644 --- a/controllers/version.go +++ b/controllers/version.go @@ -14,6 +14,9 @@ type VersionController struct { // @Success 200 // @router / [get] func (c *VersionController) GetAll() { - c.Data["json"] = map[string]string{"version": "1"} + c.Data["json"] = map[string]string{ + "service": "oc-peer", + "version": "1", + } c.ServeJSON() } diff --git a/docker-compose.yml b/docker-compose.yml index e72eabd..5193ce0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,8 +18,8 @@ services: - 8093:8080 container_name: oc-peer networks: - - catalog + - oc networks: - catalog: + oc: external: true \ No newline at end of file diff --git a/docker_conf.json b/docker_conf.json index 7302310..5d192dc 100644 --- a/docker_conf.json +++ b/docker_conf.json @@ -1,6 +1,5 @@ { "MONGO_URL":"mongodb://mongo:27017/", "MONGO_DATABASE":"DC_myDC", - "NATS_URL": "nats://nats:4222", - "PORT" : 8080 + "NATS_URL": "nats://nats:4222" } \ No newline at end of file diff --git a/oc-peer b/oc-peer new file mode 100755 index 0000000..1933c96 Binary files /dev/null and b/oc-peer differ diff --git a/peer.json b/peer.json index 532b3c3..8c4b539 100644 --- a/peer.json +++ b/peer.json @@ -1,5 +1,5 @@ { - "port" : 8080, + "port" : 8093, "MONGO_URL":"mongodb://localhost:27017/", "MONGO_DATABASE":"DC_myDC", "NATS_URL": "nats://localhost:4222"