Compare commits

..

No commits in common. "9095dc88273583e12bada1e45901fe29123fccf1" and "3d92f0b8b4d361575ca95026a9d3ac5988de4c30" have entirely different histories.

23 changed files with 45 additions and 15 deletions

View File

@ -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 && bee run -gendoc=true -downdoc=true
bee generate routers && HTTPPORT=8087 bee run -gendoc=true -downdoc=true
debug:
bee run -downdebug -gendebug
@ -30,6 +30,6 @@ publish-registry:
all: docker publish-kind publish-registry
dev: purge run-dev
dev: base run-dev
.PHONY: build run clean docker publish-kind publish-registry
.PHONY: build run clean docker publish-kind publish-registry

View File

@ -1,5 +1,5 @@
{
"port": 8087,
"port": 8080,
"MONGO_URL":"mongodb://localhost:27017/",
"MONGO_DATABASE":"DC_myDC"
}

View File

@ -1,5 +1,5 @@
appname = oc-catalog
httpport = 8087
httpport = 8080
runmode = dev
autorender = false
copyrequestbody = true

View File

@ -15,10 +15,7 @@ type VersionController struct {
// @Success 200
// @router / [get]
func (c *VersionController) GetAll() {
c.Data["json"] = map[string]string{
"service": "oc-catalog",
"version": "1",
}
c.Data["json"] = map[string]string{"version": "1"}
c.ServeJSON()
}

33
docker-compose.base.yml Executable file
View File

@ -0,0 +1,33 @@
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

View File

@ -9,7 +9,7 @@ services:
- 8087:8080
container_name: oc-catalog
networks:
- oc
- catalog
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:
oc:
catalog:
external: true

Binary file not shown.

0
swagger/favicon-16x16.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 665 B

After

Width:  |  Height:  |  Size: 665 B

0
swagger/favicon-32x32.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 628 B

2
swagger/index.html Normal file → Executable file
View File

@ -39,7 +39,7 @@
window.onload = function() {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "https://petstore.swagger.io/v2/swagger.json",
url: "swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [

0
swagger/oauth2-redirect.html Normal file → Executable file
View File

0
swagger/swagger-ui-bundle.js Normal file → Executable file
View File

0
swagger/swagger-ui-bundle.js.map Normal file → Executable file
View File

0
swagger/swagger-ui-es-bundle-core.js Normal file → Executable file
View File

0
swagger/swagger-ui-es-bundle.js Normal file → Executable file
View File

0
swagger/swagger-ui-standalone-preset.js Normal file → Executable file
View File

0
swagger/swagger-ui-standalone-preset.js.map Normal file → Executable file
View File

0
swagger/swagger-ui.css Normal file → Executable file
View File

0
swagger/swagger-ui.css.map Normal file → Executable file
View File

0
swagger/swagger-ui.js Normal file → Executable file
View File

0
swagger/swagger-ui.js.map Normal file → Executable file
View File

0
swagger/swagger.json Normal file → Executable file
View File

0
swagger/swagger.yml Normal file → Executable file
View File