Bug containerisation #3

Closed
opened 2024-02-15 10:28:41 +01:00 by pb · 5 comments
Owner

Swagger renvoit 404 à toutes les requêtes une fois contenairisé

image

Swagger renvoit 404 à toutes les requêtes une fois contenairisé ![image](/attachments/9352c840-db9d-44ad-a45a-e30332e8e40e)
Author
Owner

Wrong port redirection in docker-compose.backend.yml :

ports: 
  - 49618:8080
ports: 
  - 49618:49618
Wrong port redirection in docker-compose.backend.yml : ``` ports: - 49618:8080 ``` ``` ports: - 49618:49618 ```
Author
Owner

Made sur the application is running behind port 49618 , by adding in main() :

beego.BConfig.Listen.HTTPPort = 49618

Made sur the application is running behind port 49618 , by adding in main() : `beego.BConfig.Listen.HTTPPort = 49618`
Author
Owner

Made sur the application is running behind port 49618 , by adding in main() :

beego.BConfig.Listen.HTTPPort = 49618

Finallly, added the file directory / file to the docker image in Dockerfile :

COPY --from=builder /app/conf /app/conf

> Made sur the application is running behind port 49618 , by adding in main() : > > > `beego.BConfig.Listen.HTTPPort = 49618` Finallly, added the file directory / file to the docker image in Dockerfile : `COPY --from=builder /app/conf /app/conf`
Author
Owner

The swagger had many problems :

  • opened on the petstore swagger
  • was sending https request retuning the error 'TypeError: NetworkError when attempting to fetch resource.'

image

This is an error due to -downdoc=true that download the swagger lirbary with the petstore URL in index.html. The issue is known by the project's maintainers https://github.com/beego/swagger/pull/13)

The sed in Dockerfile resolves this, but not in the local execution.

The swagger had many problems : - opened on the petstore swagger - was sending https request retuning the error 'TypeError: NetworkError when attempting to fetch resource.' ![image](/attachments/ad550125-44ed-4402-a6e0-43ef1a345f6b) This is an error due to -downdoc=true that download the swagger lirbary with the petstore URL in index.html. The issue is known by the project's maintainers https://github.com/beego/swagger/pull/13) The sed in Dockerfile resolves this, but not in the local execution.
Author
Owner

The 404 response to the requests made either from the swagger or search has been resolved : the routers/commentsRouter_controllers.go file seems to be the root of the problem.

When generated with bee generate routers or renamed commentsRouter.go the routing of HTTP requests is successful. So we need to do either of these thing before submitting a request to the app.
-> A note has been added to the README
-> The instruction RUN bee generate routers has been added to the Dockerfile just before running the app with bee run for the first time

An issue has been opened on beego repo to understand what would cause that : https://github.com/beego/beego/issues/5596

The 404 response to the requests made either from the swagger or search has been resolved : the `routers/commentsRouter_controllers.go` file seems to be the root of the problem. When generated with `bee generate routers` or renamed `commentsRouter.go` the routing of HTTP requests is successful. So we need to do either of these thing before submitting a request to the app. -> A note has been added to the README -> The instruction `RUN bee generate routers` has been added to the Dockerfile just before running the app with bee run for the first time An issue has been opened on beego repo to understand what would cause that : https://github.com/beego/beego/issues/5596
pb closed this issue 2024-02-23 12:26:08 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: core/deprecated-oc-catalog#3
No description provided.