Bug containerisation #3
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Swagger renvoit 404 à toutes les requêtes une fois contenairisé
Wrong port redirection in docker-compose.backend.yml :
Made sur the application is running behind port 49618 , by adding in main() :
beego.BConfig.Listen.HTTPPort = 49618Finallly, added the file directory / file to the docker image in Dockerfile :
COPY --from=builder /app/conf /app/confThe swagger had many problems :
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 404 response to the requests made either from the swagger or search has been resolved : the
routers/commentsRouter_controllers.gofile seems to be the root of the problem.When generated with
bee generate routersor renamedcommentsRouter.gothe 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 routershas been added to the Dockerfile just before running the app with bee run for the first timeAn issue has been opened on beego repo to understand what would cause that : https://github.com/beego/beego/issues/5596