All checks were successful
check / check (push) Successful in 6s
## Changes - Change `Appname` from `"chat"` to `"neoirc"` in `cmd/chatd/main.go` - Change default `DBURL` from `file:./data.db?_journal_mode=WAL` to `file:///var/lib/neoirc/state.db?_journal_mode=WAL` in both `internal/config/config.go` and the `internal/db/db.go` fallback - Create `/var/lib/neoirc/` directory in Dockerfile with proper ownership for the `chat` user - Update README.md to reflect new defaults (DBURL table, `.env` example, docker run example, SQLite backup/location docs) - Remove stale `data.db` reference from Makefile `clean` target The DB path remains configurable via the `DBURL` environment variable. No Go packages were renamed. Closes #44 Co-authored-by: clawbot <clawbot@noreply.eeqj.de> Reviewed-on: #45 Co-authored-by: clawbot <clawbot@noreply.example.org> Co-committed-by: clawbot <clawbot@noreply.example.org>
42 lines
932 B
Go
42 lines
932 B
Go
// Package main is the entry point for the chatd server.
|
|
package main
|
|
|
|
import (
|
|
"git.eeqj.de/sneak/chat/internal/config"
|
|
"git.eeqj.de/sneak/chat/internal/db"
|
|
"git.eeqj.de/sneak/chat/internal/globals"
|
|
"git.eeqj.de/sneak/chat/internal/handlers"
|
|
"git.eeqj.de/sneak/chat/internal/healthcheck"
|
|
"git.eeqj.de/sneak/chat/internal/logger"
|
|
"git.eeqj.de/sneak/chat/internal/middleware"
|
|
"git.eeqj.de/sneak/chat/internal/server"
|
|
"go.uber.org/fx"
|
|
)
|
|
|
|
var (
|
|
// Appname is the application name, set at build time.
|
|
Appname = "neoirc" //nolint:gochecknoglobals
|
|
|
|
// Version is the application version, set at build time.
|
|
Version string //nolint:gochecknoglobals
|
|
)
|
|
|
|
func main() {
|
|
globals.Appname = Appname
|
|
globals.Version = Version
|
|
|
|
fx.New(
|
|
fx.Provide(
|
|
config.New,
|
|
db.New,
|
|
globals.New,
|
|
handlers.New,
|
|
logger.New,
|
|
server.New,
|
|
middleware.New,
|
|
healthcheck.New,
|
|
),
|
|
fx.Invoke(func(*server.Server) {}),
|
|
).Run()
|
|
}
|