Skip to content

Commit

Permalink
Adds Autotest and healthcheck.
Browse files Browse the repository at this point in the history
  • Loading branch information
wernight committed Jul 29, 2020
1 parent 39c5c68 commit f9cb694
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ RUN set -ex \
# Runs as mopidy user by default.
USER mopidy

# Basic check,
RUN /usr/bin/dumb-init /entrypoint.sh /usr/bin/mopidy --version

VOLUME ["/var/lib/mopidy/local", "/var/lib/mopidy/media"]

EXPOSE 6600 6680 5555/udp

ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint.sh"]
CMD ["/usr/bin/mopidy"]

HEALTHCHECK --interval=5s --timeout=2s --retries=20 \
CMD curl --connect-timeout 5 --silent --show-error --fail http://localhost:6680/ || exit 1
3 changes: 3 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sut:
build: .
command: sh -c '(mopidy &) && sleep 5 && curl --connect-timeout 5 --show-error --fail http://localhost:6680/'

0 comments on commit f9cb694

Please sign in to comment.