1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

chore: uses air instead of reflex (#3465)

This commit is contained in:
Amir Raminfar
2024-12-17 06:57:40 -08:00
committed by GitHub
parent 23ba1f6603
commit 86522ccf77
7 changed files with 63 additions and 7 deletions

57
.air.toml Normal file
View File

@@ -0,0 +1,57 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
args_bin = []
bin = "./tmp/dozzle"
cmd = "go build -race -o ./tmp/dozzle ."
delay = 1000
exclude_dir = [
"assets",
"tmp",
"data",
"node_modules",
"docs",
"test-results",
"dist",
"e2e",
"examples",
]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
include_file = []
kill_delay = "2s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = []
pre_cmd = []
rerun = false
rerun_delay = 500
send_interrupt = true
stop_on_error = false
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = false
silent = false
time = false
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
keep_scroll = true

1
.gitignore vendored
View File

@@ -14,3 +14,4 @@ coverage.out
/playwright/.cache/ /playwright/.cache/
*.pem *.pem
*.csr *.csr
tmp

View File

@@ -1 +0,0 @@
-r '\.(go)$' -R 'node_modules' -G '\*\_test.go' -s -- go run -race main.go --level debug agent

View File

@@ -1 +0,0 @@
-r '\.(go)$' -R 'node_modules' -G '\*\_test.go' -s -- go run -race main.go --level debug

View File

@@ -61,7 +61,7 @@ push: docker
tools: tools:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/cespare/reflex@latest go install github.com/air-verse/air@latest
run: docker run: docker
docker run -it --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock amir20/dozzle:latest docker run -it --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock amir20/dozzle:latest

View File

@@ -39,7 +39,7 @@ type HealthcheckCmd struct {
} }
type AgentCmd struct { type AgentCmd struct {
Addr string `arg:"env:DOZZLE_AGENT_ADDR" default:":7007" help:"sets the host:port to bind for the agent"` Addr string `arg:"--agent-addr,env:DOZZLE_AGENT_ADDR" default:":7007" help:"sets the host:port to bind for the agent"`
} }
type AgentTestCmd struct { type AgentTestCmd struct {

View File

@@ -15,12 +15,12 @@
"license": "ISC", "license": "ISC",
"author": "Amir Raminfar <findamir@gmail.com>", "author": "Amir Raminfar <findamir@gmail.com>",
"scripts": { "scripts": {
"agent:dev": "DOZZLE_AGENT_ADDR=localhost:7007 DEV=true reflex -c .reflex.agent", "agent:dev": "DEV=true air -- agent --level debug --agent-addr localhost:7007",
"watch:frontend": "vite --open http://localhost:3100/", "watch:frontend": "vite --open http://localhost:3100/",
"watch:backend": "LIVE_FS=true DEV=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex.server", "watch:backend": "LIVE_FS=true DEV=true air -- --level debug --addr localhost:3100",
"dev": "concurrently --kill-others \"npm:watch:*\"", "dev": "concurrently --kill-others \"npm:watch:*\"",
"build": "vite build", "build": "vite build",
"preview": "LIVE_FS=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex.server", "preview": "LIVE_FS=true air -- --addr localhost:3100",
"release": "bumpp", "release": "bumpp",
"test": "TZ=UTC vitest", "test": "TZ=UTC vitest",
"typecheck": "vue-tsc --noEmit", "typecheck": "vue-tsc --noEmit",