diff --git a/Makefile b/Makefile index e591cba..05fbff3 100755 --- a/Makefile +++ b/Makefile @@ -3,14 +3,14 @@ build: clean bee pack -base: - docker compose -f docker-compose.base.yml up -d - run: bee run -gendoc=true -downdoc=true +purge: + lsof -t -i:8087 | xargs kill | true + run-dev: - bee generate routers && HTTPPORT=8087 bee run -gendoc=true -downdoc=true + bee generate routers && bee run -gendoc=true -downdoc=true debug: bee run -downdebug -gendebug @@ -30,6 +30,6 @@ publish-registry: all: docker publish-kind publish-registry -dev: base run-dev +dev: purge run-dev -.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/catalog.json b/catalog.json index f3ebfe5..cf1b187 100755 --- a/catalog.json +++ b/catalog.json @@ -1,5 +1,5 @@ { - "port": 8080, + "port": 8087, "MONGO_URL":"mongodb://localhost:27017/", "MONGO_DATABASE":"DC_myDC" } \ No newline at end of file diff --git a/conf/app.conf b/conf/app.conf index 34105f7..d242abc 100755 --- a/conf/app.conf +++ b/conf/app.conf @@ -1,5 +1,5 @@ appname = oc-catalog -httpport = 8080 +httpport = 8087 runmode = dev autorender = false copyrequestbody = true diff --git a/controllers/version.go b/controllers/version.go index 6e18c67..1a40348 100755 --- a/controllers/version.go +++ b/controllers/version.go @@ -15,7 +15,10 @@ 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-catalog", + "version": "1", + } c.ServeJSON() } diff --git a/docker-compose.yml b/docker-compose.yml index c86bbc8..e9f84df 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: - 8087:8080 container_name: oc-catalog networks: - - catalog + - oc labels: - "traefik.enable=true" - "traefik.http.routers.catalog.entrypoints=web" @@ -20,5 +20,5 @@ services: - "traefik.http.services.catalog.loadbalancer.server.port=8080" - "traefik.http.middlewares.catalog.forwardauth.address=http://oc-auth:8080/oc/forward" networks: - catalog: + oc: external: true \ No newline at end of file diff --git a/oc-catalog b/oc-catalog new file mode 100755 index 0000000..94761f9 Binary files /dev/null and b/oc-catalog differ diff --git a/swagger/favicon-16x16.png b/swagger/favicon-16x16.png old mode 100755 new mode 100644 diff --git a/swagger/favicon-32x32.png b/swagger/favicon-32x32.png old mode 100755 new mode 100644 diff --git a/swagger/index.html b/swagger/index.html old mode 100755 new mode 100644 index 9df41b1..2a9d4e2 --- a/swagger/index.html +++ b/swagger/index.html @@ -39,7 +39,7 @@ window.onload = function() { // Begin Swagger UI call region const ui = SwaggerUIBundle({ - url: "swagger.json", + url: "https://petstore.swagger.io/v2/swagger.json", dom_id: '#swagger-ui', deepLinking: true, presets: [ diff --git a/swagger/oauth2-redirect.html b/swagger/oauth2-redirect.html old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui-bundle.js b/swagger/swagger-ui-bundle.js old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui-bundle.js.map b/swagger/swagger-ui-bundle.js.map old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui-es-bundle-core.js b/swagger/swagger-ui-es-bundle-core.js old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui-es-bundle.js b/swagger/swagger-ui-es-bundle.js old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui-standalone-preset.js b/swagger/swagger-ui-standalone-preset.js old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui-standalone-preset.js.map b/swagger/swagger-ui-standalone-preset.js.map old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui.css b/swagger/swagger-ui.css old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui.css.map b/swagger/swagger-ui.css.map old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui.js b/swagger/swagger-ui.js old mode 100755 new mode 100644 diff --git a/swagger/swagger-ui.js.map b/swagger/swagger-ui.js.map old mode 100755 new mode 100644 diff --git a/swagger/swagger.json b/swagger/swagger.json old mode 100755 new mode 100644 diff --git a/swagger/swagger.yml b/swagger/swagger.yml old mode 100755 new mode 100644