Skip to content

Commit

Permalink
Live reload (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vizualni authored May 6, 2022
1 parent aad8574 commit 486c9f1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "/tmp"

[build]
cmd = "go run ./cmd/palomad start"
delay = 1000
exclude_dir = ["third_party_proto", "scripts"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html", "proto", "yaml"]
kill_delay = "0s"
log = "/dev/null"
send_interrupt = false
stop_on_error = false

[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"

[log]
time = false

[misc]
clean_on_exit = false

[screen]
clear_on_rebuild = false
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ WORKDIR /app
#### Local development ####
###########################
FROM base AS local-dev
ENTRYPOINT ["go", "run", "./cmd/palomad/"]
RUN cd /tmp && go install github.com/cosmtrek/air@latest

# air is not set to entrypoint because I want to override that behaviour
# when using docker-compose run.
CMD ["air"]


###########################
#### Builder ####
Expand Down

0 comments on commit 486c9f1

Please sign in to comment.