compose upgrade
This commit is contained in:
parent
88c21d1828
commit
153e576827
@ -12,7 +12,11 @@ EXPOSE 49618
|
|||||||
WORKDIR /go/src/oc-catalog
|
WORKDIR /go/src/oc-catalog
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
RUN go get github.com/beego/bee/v2
|
|
||||||
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
|
||||||
|
RUN go get github.com/beego/bee/v2 && go install github.com/beego/bee/v2@master
|
||||||
|
|
||||||
# Manually download swagger during build
|
# Manually download swagger during build
|
||||||
RUN ["/bin/bash", "-c", \
|
RUN ["/bin/bash", "-c", \
|
||||||
@ -21,8 +25,6 @@ RUN ["/bin/bash", "-c", \
|
|||||||
curl -sL https://github.com/beego/swagger/archive/v3.tar.gz | tar xvvvz --overwrite -C swagger --strip-components=1"]
|
curl -sL https://github.com/beego/swagger/archive/v3.tar.gz | tar xvvvz --overwrite -C swagger --strip-components=1"]
|
||||||
|
|
||||||
|
|
||||||
COPY go.mod .
|
|
||||||
COPY go.sum .
|
|
||||||
RUN go mod download -x
|
RUN go mod download -x
|
||||||
|
|
||||||
# COPY . .
|
# COPY . .
|
||||||
|
14
README.md
14
README.md
@ -1,7 +1,17 @@
|
|||||||
# OC Catalog
|
# OC Catalog
|
||||||
|
|
||||||
OpenCloud Catalog API
|
## OpenCloud Catalog API
|
||||||
|
|
||||||
|
Uses the Beego framework
|
||||||
|
|
||||||
|
To install the Beego bee command :
|
||||||
|
|
||||||
|
go install github.com/beego/bee/v2@master
|
||||||
|
|
||||||
|
To build and run :
|
||||||
|
|
||||||
|
go mod tidy
|
||||||
|
bee run -downdoc=true -gendoc=true
|
||||||
|
|
||||||
## Full deploy
|
## Full deploy
|
||||||
|
|
||||||
@ -11,6 +21,8 @@ Deploy with docker:
|
|||||||
and populate DB (or other scripts) with:
|
and populate DB (or other scripts) with:
|
||||||
`docker exec -it oc-catalog_oc-catalog_1 ./scripts/populate_models.sh ./scripts/demo.json`
|
`docker exec -it oc-catalog_oc-catalog_1 ./scripts/populate_models.sh ./scripts/demo.json`
|
||||||
|
|
||||||
|
or out of docker `./scripts/populate_models.sh ./scripts/demo.json`
|
||||||
|
|
||||||
## Dev
|
## Dev
|
||||||
|
|
||||||
Start DB with `docker-compose up -d` and run the API with `bee run -downdoc=true -gendoc=true`
|
Start DB with `docker-compose up -d` and run the API with `bee run -downdoc=true -gendoc=true`
|
||||||
|
@ -94,7 +94,7 @@ func (u *ScheduleController) CheckSchedule(cron string, duration uint, startDate
|
|||||||
// @Param startDate query time.Time true "Start date"
|
// @Param startDate query time.Time true "Start date"
|
||||||
// @Param stopDate query time.Time true "End date"
|
// @Param stopDate query time.Time true "End date"
|
||||||
// @Success 200 {object} []models.ScheduleDB
|
// @Success 200 {object} []models.ScheduleDB
|
||||||
// @Success 201 Too much elements within the range of dates
|
// @Success 201 Too many elements within the range of dates
|
||||||
// @Failure 403 Authentication issue
|
// @Failure 403 Authentication issue
|
||||||
// @Failure 400 Other error. Check the output
|
// @Failure 400 Other error. Check the output
|
||||||
// // @Security jwtAPIToken
|
// // @Security jwtAPIToken
|
||||||
|
@ -27,22 +27,30 @@ type RepositoryModel struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ComputingNEWModel struct {
|
type ComputingNEWModel struct {
|
||||||
Description string `json:"description" required:"true"`
|
Description string `json:"description,omitempty" required:"true"`
|
||||||
Name string `json:"name,omitempty" required:"true" validate:"required" description:"Name of the computing"`
|
Name string `json:"name,omitempty" required:"true" validate:"required" description:"Name of the computing"`
|
||||||
ShortDescription string `json:"short_description" required:"true" validate:"required"`
|
ShortDescription string `json:"short_description,omitempty" required:"true" validate:"required"`
|
||||||
Logo string `json:"logo" required:"true" validate:"required"`
|
Logo string `json:"logo,omitempty" required:"true" validate:"required"`
|
||||||
|
|
||||||
Type string `json:"type,omitempty" required:"true"`
|
Type string `json:"type,omitempty" required:"true"`
|
||||||
Owner string `json:"owner"`
|
Owner string `json:"owner,omitempty"`
|
||||||
License string `json:"license"`
|
License string `json:"license,omitempty"`
|
||||||
Price uint `json:"price"`
|
Price uint `json:"price,omitempty"`
|
||||||
|
|
||||||
ExecutionRequirements ExecutionRequirementsModel `json:"execution_requirements"`
|
ExecutionRequirements ExecutionRequirementsModel `json:"execution_requirements,omitempty"`
|
||||||
|
|
||||||
Dinputs []string
|
Dinputs []string `json:"dinputs,omitempty"`
|
||||||
Doutputs []string
|
Doutputs []string `json:"doutputs,omitempty"`
|
||||||
|
|
||||||
Repository RepositoryModel `json:"repository"`
|
Image string `json:"image,omitempty"`
|
||||||
|
Command string `json:"command,omitempty"`
|
||||||
|
Arguments []string `json:"arguments,omitempty"`
|
||||||
|
Environment []string `json:"environment,omitempty"`
|
||||||
|
Ports []string `json:"ports,omitempty"`
|
||||||
|
|
||||||
|
CustomDeployment string `json:"custom_deployment,omitempty"`
|
||||||
|
|
||||||
|
Repository RepositoryModel `json:"repository,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ComputingModel struct {
|
type ComputingModel struct {
|
||||||
|
@ -506,7 +506,8 @@ func ParseMxGraph(username, workflowName, xmlData string) (err error, mxissues [
|
|||||||
}
|
}
|
||||||
|
|
||||||
if currentWorkflow.Schedules.IsBooked {
|
if currentWorkflow.Schedules.IsBooked {
|
||||||
return errors.New("Can't modify a booked workflow"), nil
|
//well, let's allow that
|
||||||
|
//return errors.New("Can't modify a booked workflow"), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var xmlModel MxGraphModel
|
var xmlModel MxGraphModel
|
||||||
|
BIN
scripts/local_imgs/Thumbs.db
Normal file
BIN
scripts/local_imgs/Thumbs.db
Normal file
Binary file not shown.
0
scripts/local_imgs/Thumbs.db:encryptable
Normal file
0
scripts/local_imgs/Thumbs.db:encryptable
Normal file
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
|
||||||
# Must specify a JSON with a following structure:
|
# Must specify a JSON with a following structure:
|
||||||
|
Loading…
Reference in New Issue
Block a user