diff --git a/Makefile b/Makefile index 40d4bcf..083209b 100755 --- a/Makefile +++ b/Makefile @@ -6,8 +6,13 @@ build: clean run: bee run -gendoc=true -downdoc=true -dev: - bee generate routers && HTTPPORT=8089 bee run -gendoc=true -downdoc=true +purge: + lsof -t -i:8089 | 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/README.md b/README.md index 26cd272..e85a86d 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Manages user workspaces To build : - bee generate routers && bee run -gendoc=true -downdoc=true + bee generate routers && bee run -gendoc=true -downdoc=true -runmode=prod OR make dev diff --git a/controllers/version.go b/controllers/version.go index 1f7ae37..311dbbe 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-workspace", + "version": "1", + } c.ServeJSON() } diff --git a/docker-compose.base.yml b/docker-compose.base.yml deleted file mode 100755 index cefe5d6..0000000 --- a/docker-compose.base.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: '3.4' - -services: - mongo: - image: 'mongo:latest' - networks: - - catalog - ports: - - 27017:27017 - container_name: mongo - volumes: - - oc-catalog-data:/data/db - - oc-catalog-data:/data/configdb - - mongo-express: - image: "mongo-express:latest" - restart: always - depends_on: - - mongo - networks: - - catalog - ports: - - 8081:8081 - environment: - - ME_CONFIG_BASICAUTH_USERNAME=test - - ME_CONFIG_BASICAUTH_PASSWORD=test - -volumes: - oc-catalog-data: - -networks: - catalog: - external: true - # name: catalog diff --git a/docker-compose.yml b/docker-compose.yml index 0acf8fc..1ae83f9 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,8 +18,8 @@ services: - "traefik.http.middlewares.workspace.forwardauth.address=http://oc-auth:8080/oc/forward" container_name: oc-workspace networks: - - catalog + - oc networks: - catalog: + oc: external: true \ No newline at end of file diff --git a/oc-workspace b/oc-workspace new file mode 100755 index 0000000..a6be2ee Binary files /dev/null and b/oc-workspace differ diff --git a/workspace.json b/workspace.json index aa673e5..b13f4cf 100755 --- a/workspace.json +++ b/workspace.json @@ -1,5 +1,5 @@ { - "port":8080, + "port":8089, "MONGO_URL":"mongodb://localhost:27017/", "MONGO_DATABASE":"DC_myDC" } \ No newline at end of file