mtakaki / cachet-url-monitor

URL monitor plugin for cachethq.io
MIT License
124 stars 48 forks source link

No module named 'cachet_url_monitor.plugins' #105

Open pcevela opened 4 years ago

pcevela commented 4 years ago

Hi @mtakaki, this merge broke docker implementation:

[root@x1 alpine-test]# docker pull mtakaki/cachet-url-monitor
Using default tag: latest
latest: Pulling from mtakaki/cachet-url-monitor
Digest: sha256:f3bbd05898ed4bd7e8de6b612c641008f5f2adbaeb7efc2b4401b589eadb97e3
Status: Image is up to date for mtakaki/cachet-url-monitor:latest
docker.io/mtakaki/cachet-url-monitor:latest
[root@x1 alpine-test]# docker run --rm -it -v "$PWD":/usr/src/app/config/ mtakaki/cachet-url-monitor
Traceback (most recent call last):
  File "./cachet_url_monitor/scheduler.py", line 14, in <module>
    from cachet_url_monitor.plugins.token_provider import get_token
ModuleNotFoundError: No module named 'cachet_url_monitor.plugins'

release-0.6.9 is working correctly

ygwane commented 4 years ago

Same issue here

quadeare commented 4 years ago

Same issue here.

Previous release works : release-0.6.9

dgiebert commented 4 years ago

Regarding the Dockerfile you are not moving the plugins folder, so a working change could be:

FROM python:3.7.2-alpine
MAINTAINER Mitsuo Takaki <mitsuotakaki@gmail.com>

WORKDIR /usr/src/app

RUN python3.7 -m pip install --upgrade pip
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt

COPY cachet_url_monitor /usr/src/app/cachet_url_monitor
COPY setup.py /usr/src/app/
RUN python3.7 setup.py install

COPY config.yml /usr/src/app/config/
VOLUME /usr/src/app/config/

CMD ["python3.7", "./cachet_url_monitor/scheduler.py", "config/config.yml"]

Not sure if that is the same error for the release ?

ezlo-codrin commented 3 years ago

same issue on 0.6.10