Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a88b0c407 | |||
| ac786f6eab | |||
| d65f53d00f | |||
| 2e34c48354 |
@@ -6,6 +6,7 @@ COPY *.go ./
|
|||||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /goprg
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /goprg
|
||||||
RUN mkdir /data
|
RUN mkdir /data
|
||||||
COPY services.json /data/services.json
|
COPY services.json /data/services.json
|
||||||
|
##COPY services.json /services.json
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["/goprg"]
|
CMD ["/goprg"]
|
||||||
2
main.go
2
main.go
@@ -190,7 +190,7 @@ func envOr(k, def string) string {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
addr := envOr("addr", ":8080")
|
addr := envOr("addr", ":8080")
|
||||||
cfgPath := envOr("config", "/data/services.json")
|
cfgPath := envOr("config", "./services.json")
|
||||||
|
|
||||||
state := newState()
|
state := newState()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user