chore: add .air.toml and fix docker-compose paths for backend
This commit is contained in:
parent
dbbab26f71
commit
6e7243a21c
2 changed files with 46 additions and 1 deletions
44
backend/.air.toml
Normal file
44
backend/.air.toml
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
root = "."
|
||||||
|
testdata_dir = "testdata"
|
||||||
|
tmp_dir = "tmp"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
args_bin = []
|
||||||
|
bin = "./tmp/main"
|
||||||
|
cmd = "go build -o ./tmp/main ./cmd/api"
|
||||||
|
delay = 1000
|
||||||
|
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
|
||||||
|
exclude_file = []
|
||||||
|
exclude_regex = ["_test.go"]
|
||||||
|
exclude_unchanged = false
|
||||||
|
follow_symlink = false
|
||||||
|
full_bin = ""
|
||||||
|
include_dir = ["cmd", "internal", "pkg"]
|
||||||
|
include_ext = ["go", "tpl", "tmpl", "html"]
|
||||||
|
include_regex = []
|
||||||
|
kill_delay = "0s"
|
||||||
|
log = "build-errors.log"
|
||||||
|
poll = false
|
||||||
|
poll_interval = 0
|
||||||
|
rerun = false
|
||||||
|
rerun_delay = 500
|
||||||
|
send_interrupt = false
|
||||||
|
stop_on_error = true
|
||||||
|
|
||||||
|
[color]
|
||||||
|
app = ""
|
||||||
|
build = "yellow"
|
||||||
|
main = "magenta"
|
||||||
|
runner = "green"
|
||||||
|
watcher = "cyan"
|
||||||
|
|
||||||
|
[log]
|
||||||
|
main_only = false
|
||||||
|
time = false
|
||||||
|
|
||||||
|
[misc]
|
||||||
|
clean_on_exit = false
|
||||||
|
|
||||||
|
[screen]
|
||||||
|
clear_on_rebuild = false
|
||||||
|
keep_scroll = true
|
||||||
|
|
@ -21,7 +21,7 @@ services:
|
||||||
backend:
|
backend:
|
||||||
image: cosmtrek/air
|
image: cosmtrek/air
|
||||||
container_name: sim-backend-dev
|
container_name: sim-backend-dev
|
||||||
working_dir: /app/backend
|
working_dir: /app
|
||||||
ports:
|
ports:
|
||||||
- "8522:8522"
|
- "8522:8522"
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -29,6 +29,7 @@ services:
|
||||||
- PORT=8522
|
- PORT=8522
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
command: air -c backend/.air.toml
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue