Switch to another default port
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
This commit is contained in:
parent
45fbfed51b
commit
758e3c75cc
|
@ -15,7 +15,7 @@
|
|||
docker build -t gitea-sonarqube-pr-bot/dev -f contrib/Dockerfile contrib
|
||||
|
||||
# Start the environment
|
||||
docker run --rm -it -p 49182:8080 -v "$(pwd):/projects" gitea-sonarqube-pr-bot/dev
|
||||
docker run --rm -it -p 49182:3000 -v "$(pwd):/projects" gitea-sonarqube-pr-bot/dev
|
||||
|
||||
# Build the binary
|
||||
go build ./cmd/gitea-sonarqube-bot
|
||||
|
|
|
@ -5,6 +5,6 @@ RUN apk --no-cache add build-base git bash
|
|||
WORKDIR /projects
|
||||
|
||||
VOLUME ["/projects"]
|
||||
EXPOSE 8080
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["bash"]
|
||||
|
|
|
@ -28,7 +28,7 @@ func Serve(c *cli.Context) error {
|
|||
r.HandleFunc("/hooks/sonarqube", NewSonarQubeWebhookHandler(giteaSdk.New(), sqSdk.New()).Handle).Methods("POST").Headers("X-SonarQube-Project", "")
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: "0.0.0.0:8080",
|
||||
Addr: "0.0.0.0:3000",
|
||||
// Good practice to set timeouts to avoid Slowloris attacks.
|
||||
WriteTimeout: time.Second * 15,
|
||||
ReadTimeout: time.Second * 15,
|
||||
|
@ -37,7 +37,7 @@ func Serve(c *cli.Context) error {
|
|||
}
|
||||
|
||||
go func() {
|
||||
log.Println("Listen on :8080")
|
||||
log.Println("Listen on :3000")
|
||||
if err := srv.ListenAndServe(); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue