Switch to another default port

Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
This commit is contained in:
justusbunsi 2021-10-09 21:17:54 +02:00
parent 45fbfed51b
commit 758e3c75cc
No known key found for this signature in database
GPG key ID: 990B348ECAC9C7DB
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -5,6 +5,6 @@ RUN apk --no-cache add build-base git bash
WORKDIR /projects
VOLUME ["/projects"]
EXPOSE 8080
EXPOSE 3000
CMD ["bash"]

View file

@ -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)
}