Move backend Dockerfile to repo root for git access
All checks were successful
check / check (push) Successful in 33s
All checks were successful
check / check (push) Successful in 33s
Place the backend Dockerfile at repo root as Dockerfile.backend so the build context includes .git, giving git describe access for version stamping. Fix .gitignore pattern to anchor /netwatch-server so it does not exclude cmd/netwatch-server/. Remove .git from .dockerignore. Update CI workflow and backend Makefile docker target.
This commit is contained in:
42
backend/cmd/netwatch-server/main.go
Normal file
42
backend/cmd/netwatch-server/main.go
Normal file
@@ -0,0 +1,42 @@
|
||||
// Package main is the entry point for netwatch-server.
|
||||
package main
|
||||
|
||||
import (
|
||||
"sneak.berlin/go/netwatch/internal/config"
|
||||
"sneak.berlin/go/netwatch/internal/globals"
|
||||
"sneak.berlin/go/netwatch/internal/handlers"
|
||||
"sneak.berlin/go/netwatch/internal/healthcheck"
|
||||
"sneak.berlin/go/netwatch/internal/logger"
|
||||
"sneak.berlin/go/netwatch/internal/middleware"
|
||||
"sneak.berlin/go/netwatch/internal/reportbuf"
|
||||
"sneak.berlin/go/netwatch/internal/server"
|
||||
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
//nolint:gochecknoglobals // set via ldflags at build time
|
||||
var (
|
||||
Appname = "netwatch-server"
|
||||
Version string
|
||||
Buildarch string
|
||||
)
|
||||
|
||||
func main() {
|
||||
globals.Appname = Appname
|
||||
globals.Version = Version
|
||||
globals.Buildarch = Buildarch
|
||||
|
||||
fx.New(
|
||||
fx.Provide(
|
||||
config.New,
|
||||
globals.New,
|
||||
handlers.New,
|
||||
healthcheck.New,
|
||||
logger.New,
|
||||
middleware.New,
|
||||
reportbuf.New,
|
||||
server.New,
|
||||
),
|
||||
fx.Invoke(func(*server.Server) {}),
|
||||
).Run()
|
||||
}
|
||||
Reference in New Issue
Block a user