Dockerfile, settable port

* added Dockerfile
* server listenting port is configurable via CLI argument
This commit is contained in:
zegkljan
2022-02-11 08:02:27 +01:00
parent 859d9c93ed
commit e2aa0d1aea
3 changed files with 24 additions and 2 deletions
+2 -1
View File
@@ -34,6 +34,7 @@ type Server struct {
}
type ServerConfig struct {
Port int
DbPath string
TilepackPath string
ApkPath string
@@ -59,7 +60,7 @@ func (s *Server) Run(ctx context.Context) {
router := s.setupRouter()
server := &http.Server{
Addr: fmt.Sprintf(":%d", 8080),
Addr: fmt.Sprintf(":%d", s.config.Port),
Handler: router,
}
s.log.Infof("Running on %s", server.Addr)