forked from Doma/docker-mopidy
Adds Autotest and healthcheck.
This commit is contained in:
@@ -60,9 +60,15 @@ RUN set -ex \
|
|||||||
# Runs as mopidy user by default.
|
# Runs as mopidy user by default.
|
||||||
USER mopidy
|
USER mopidy
|
||||||
|
|
||||||
|
# Basic check,
|
||||||
|
RUN /usr/bin/dumb-init /entrypoint.sh /usr/bin/mopidy --version
|
||||||
|
|
||||||
VOLUME ["/var/lib/mopidy/local", "/var/lib/mopidy/media"]
|
VOLUME ["/var/lib/mopidy/local", "/var/lib/mopidy/media"]
|
||||||
|
|
||||||
EXPOSE 6600 6680 5555/udp
|
EXPOSE 6600 6680 5555/udp
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint.sh"]
|
||||||
CMD ["/usr/bin/mopidy"]
|
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
docker-compose.test.yml
Normal file
3
docker-compose.test.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
sut:
|
||||||
|
build: .
|
||||||
|
command: sh -c '(mopidy &) && sleep 5 && curl --connect-timeout 5 --show-error --fail http://localhost:6680/'
|
||||||
Reference in New Issue
Block a user