Skip to content

Commit

Permalink
re enable debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zulkhair committed Jun 12, 2024
1 parent 8685e76 commit 8e8e2fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/world/cardinal/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This will restart the following Docker services:
if cfg.Debug {
err = teacmd.DockerRestart(cfg, []teacmd.DockerService{
teacmd.DockerServiceCardinalDebug,
teacmd.DockerServiceNakama,
teacmd.DockerServiceNakamaDebug,
})
} else {
err = teacmd.DockerRestart(cfg, []teacmd.DockerService{
Expand Down
1 change: 1 addition & 0 deletions cmd/world/cardinal/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func init() {
startCmd.Flags().Bool(flagBuild, true, "Rebuild Docker images before starting")
startCmd.Flags().Bool(flagDetach, false, "Run in detached mode")
startCmd.Flags().String(flagLogLevel, "", "Set the log level")
startCmd.Flags().Bool(flagDebug, false, "Enable delve debugging")
}

// replaceBoolWithFlag overwrites the contents of vale with the contents of the given flag. If the flag
Expand Down
7 changes: 4 additions & 3 deletions common/teacmd/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
DockerServiceEVM DockerService = "evm"
DockerServiceDA DockerService = "celestia-devnet"
DockerServiceCardinalDebug DockerService = "cardinal-debug"
DockerServiceNakamaDebug DockerService = "nakama-debug"
)

type DockerService string
Expand Down Expand Up @@ -98,15 +99,14 @@ func DockerStart(cfg *config.Config, services []DockerService) error {
// DockerStartAll starts both cardinal and nakama
func DockerStartAll(cfg *config.Config) error {
services := []DockerService{
DockerServiceNakama,
DockerServiceNakamaDB,
DockerServiceRedis,
}

if cfg.Debug {
services = append(services, DockerServiceCardinalDebug)
services = append(services, DockerServiceCardinalDebug, DockerServiceNakamaDebug)
} else {
services = append(services, DockerServiceCardinal)
services = append(services, DockerServiceCardinal, DockerServiceNakama)
}

return DockerStart(cfg, services)
Expand Down Expand Up @@ -150,6 +150,7 @@ func DockerStopAll() error {
DockerServiceCardinal,
DockerServiceCardinalDebug,
DockerServiceNakama,
DockerServiceNakamaDebug,
DockerServiceNakamaDB,
DockerServiceRedis,
})
Expand Down

0 comments on commit 8e8e2fc

Please sign in to comment.