Skip to content

Commit

Permalink
Add healthcheck command and add Docker HEALTHCHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
iddan authored and dennwc committed Nov 14, 2019
1 parent 10e3489 commit 85ea1bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ VOLUME [ "/data" ]

EXPOSE 64210

HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "cayley", "health" ]

# Adding everything to entrypoint allows us to init, load and serve only with
# arguments passed to docker run. For example:
# `docker run cayleygraph/cayley --init -i /data/my_data.nq`
Expand Down
1 change: 1 addition & 0 deletions cmd/cayley/cayley.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func init() {
command.NewHTTPCmd(),
command.NewConvertCmd(),
command.NewDedupCommand(),
command.NewHealthCmd(),
)
rootCmd.PersistentFlags().StringP("config", "c", "", "path to an explicit configuration file")

Expand Down

0 comments on commit 85ea1bb

Please sign in to comment.