Fixed router not working

This commit is contained in:
pb
2024-02-19 17:24:14 +01:00
parent 58d5493584
commit 20a2636677
4 changed files with 42 additions and 11 deletions

View File

@@ -6,12 +6,16 @@ COPY . .
RUN go get github.com/beego/bee/v2 && go install github.com/beego/bee/v2@master
# Generating routers/commentsRouter.go
RUN bee generate routers
# Generating the swagger
RUN timeout 20 bee run -gendoc=true -downdoc=true -runmode=dev || :
RUN sed -i 's/http:\/\/127.0.0.1:8080\/swagger\/swagger.json/swagger.json/g' swagger/index.html
RUN sed -i 's/https:\/\/petstore.swagger.io\/v2\/swagger.json/swagger.json/g' swagger/index.html
RUN ls -l routers
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" .