mirror of
https://github.com/Cernobor/oko-server.git
synced 2025-02-24 08:27:17 +00:00
Dockerfile, settable port
* added Dockerfile * server listenting port is configurable via CLI argument
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user