Skip to content

Commit 486c9f1

Browse files
authored
Live reload (#102)
1 parent aad8574 commit 486c9f1

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.air.toml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
root = "."
2+
testdata_dir = "testdata"
3+
tmp_dir = "/tmp"
4+
5+
[build]
6+
cmd = "go run ./cmd/palomad start"
7+
delay = 1000
8+
exclude_dir = ["third_party_proto", "scripts"]
9+
exclude_file = []
10+
exclude_regex = ["_test.go"]
11+
exclude_unchanged = false
12+
follow_symlink = false
13+
full_bin = ""
14+
include_dir = []
15+
include_ext = ["go", "tpl", "tmpl", "html", "proto", "yaml"]
16+
kill_delay = "0s"
17+
log = "/dev/null"
18+
send_interrupt = false
19+
stop_on_error = false
20+
21+
[color]
22+
app = ""
23+
build = "yellow"
24+
main = "magenta"
25+
runner = "green"
26+
watcher = "cyan"
27+
28+
[log]
29+
time = false
30+
31+
[misc]
32+
clean_on_exit = false
33+
34+
[screen]
35+
clear_on_rebuild = false

Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ WORKDIR /app
99
#### Local development ####
1010
###########################
1111
FROM base AS local-dev
12-
ENTRYPOINT ["go", "run", "./cmd/palomad/"]
12+
RUN cd /tmp && go install github.com/cosmtrek/air@latest
13+
14+
# air is not set to entrypoint because I want to override that behaviour
15+
# when using docker-compose run.
16+
CMD ["air"]
17+
1318

1419
###########################
1520
#### Builder ####

0 commit comments

Comments
 (0)