chiruv123 opened a new issue, #4496: URL: https://github.com/apache/incubator-devlake/issues/4496
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened Running apache/devlake:v0.15.0 with environment variable PORT=8080 results in this startup error: ``` 2023-02-22T18:48:49.616435101Z [GIN-debug] Listening and serving HTTP on 8080 2023-02-22T18:48:49.609124257Z [GIN-debug] [ERROR] listen tcp: address 8080: missing port in address 2023-02-22T18:48:49.616447001Z panic: listen tcp: address 8080: missing port in address 2023-02-22T18:48:49.616451101Z 2023-02-22T18:48:49.616455101Z goroutine 1 [running]: 2023-02-22T18:48:49.616459001Z [github.com/apache/incubator-devlake/api.CreateApiService()](http://github.com/apache/incubator-devlake/api.CreateApiService()) 2023-02-22T18:48:49.616463001Z /app/api/api.go:100 +0x4c5 2023-02-22T18:48:49.616467101Z main.main() 2023-02-22T18:48:49.616471201Z /app/main.go:39 +0x7e ``` The app then does not respond to requests on port 8080. In my case, I'm trying to run this on an Azure App Service. Azure App Services automatically (and unchangeably) supply `-e PORT=8080` when issuing the `docker run` command. The full command is: ``` docker run -d --expose=8080 --name <redacted azure web app name> -e PORT=8080 -e WEBSITE_SITE_NAME=<redacted azure web app name> -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=<redacted azure web app name>.[azurewebsites.net](http://azurewebsites.net/) -e WEBSITE_INSTANCE_ID=<redacted random azure id> -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False apache/devlake:v0.15.0 ``` ### What do you expect to happen Container starts up normally and responds to requests. ### How to reproduce 1. Create a database 2. Create an Azure Web App with access to the database 1. Add the db connection string as an App Setting/Environment Variable 2. Configure it to run apache/devlake:v0.15.0 ### Anything else It seems the default value of PORT is `:8080`, [seen here](https://github.com/apache/incubator-devlake/blob/d9a0f7f512651ed84029f8bd8743d7365386d6c5/backend/core/config/config_viper.go#L74). I also see that the PORT value is being split on a colon `:` character [here](https://github.com/apache/incubator-devlake/blob/d9a0f7f512651ed84029f8bd8743d7365386d6c5/backend/server/api/api.go#L118). These examples in the code seem to treat the PORT value as a url or connection string rather than a simple port number. I consider this a bug since it's not conventional for a port to include a colon or anything besides a number. It also conflicts with docker's default behavior for how ports are specified. ### Version main ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
