Skip to content

Commit 4c06786

Browse files
committed
use pilu/fresh to ensure that server restarts when files are edited
1 parent b3c6c28 commit 4c06786

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

dev-env/app/Dockerfile

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
FROM alpine:latest
1+
FROM golang:1.11-alpine
22

33
RUN apk --no-cache add ca-certificates
44

5-
CMD ["/app_binary/hercules"]
5+
# git is a prereq of go get
6+
RUN apk --update add git
7+
8+
# get "fresh" - rebuilds the server whenever files change
9+
RUN go get github.com/pilu/fresh
10+
11+
WORKDIR /go/src/github.com/kshitij10496/hercules
12+
13+
CMD ["fresh"]

dev-env/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
ports:
1717
- "8070:8080"
1818
volumes:
19-
- ./binary:/app_binary
19+
- ..:/go/src/github.com/kshitij10496/hercules
2020
networks:
2121
app_network:
2222
environment:

0 commit comments

Comments
 (0)