diff --git a/.travis.yml b/.travis.yml index 30b971b..44c576b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ services: python: - "2.7" install: - - docker build -f tests/Dockerfile -t txgio/anki-connect . + - docker build -f tests/docker/Dockerfile -t txgio/anki-connect . script: - docker run -ti -d --rm -p 8765:8765 txgio/anki-connect - sleep 5 diff --git a/tests/Dockerfile b/tests/docker/Dockerfile similarity index 58% rename from tests/Dockerfile rename to tests/docker/Dockerfile index 46f6001..e4c0e9e 100644 --- a/tests/Dockerfile +++ b/tests/docker/Dockerfile @@ -9,12 +9,11 @@ RUN mkdir -p /home/anki-user/Documents/Anki/addons COPY AnkiConnect.py /home/anki-user/Documents/Anki/addons -# Required if you want to access it from another IP address. -RUN sed -i 's/127.0.0.1/0.0.0.0/' /home/anki-user/Documents/Anki/addons/AnkiConnect.py +ENV ANKICONNECT_BIND_ADDRESS 0.0.0.0 -COPY tests/prefs.db /home/anki-user/Documents/Anki/prefs.db +COPY tests/docker/prefs.db /home/anki-user/Documents/Anki/prefs.db -ADD tests/entrypoint.sh /entrypoint.sh +ADD tests/docker/entrypoint.sh /entrypoint.sh USER root RUN chmod +x /entrypoint.sh diff --git a/tests/entrypoint.sh b/tests/docker/entrypoint.sh similarity index 100% rename from tests/entrypoint.sh rename to tests/docker/entrypoint.sh diff --git a/tests/prefs.db b/tests/docker/prefs.db similarity index 100% rename from tests/prefs.db rename to tests/docker/prefs.db