diff --git a/Dockerfile b/Dockerfile index 7014eb5..7c572ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /usr/src/app COPY . . # Build the extension module -RUN (cd simpleddc-extension && python setup.py build_ext --inplace) +RUN (cd simpleddc-extension && python setup.py install) # Install Python dependencies for the ddc-mqtt project RUN pip install --no-cache-dir -r ./ddc-mqtt/requirements.txt diff --git a/ddc-mqtt/requirements.txt b/ddc-mqtt/requirements.txt index 190577f..17d62e0 100644 --- a/ddc-mqtt/requirements.txt +++ b/ddc-mqtt/requirements.txt @@ -1,2 +1,2 @@ pyyaml>=6.0 -paho-mqtt>=1.6.1 \ No newline at end of file +paho-mqtt==1.6.1 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 46661df..c6f9d54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,11 @@ version: '3.8' services: app: build: . + network_mode: "host" volumes: - .:/usr/src/app - ports: - - "8000:8000" # Adjust the left side to the port you want to expose on the host + devices: + - "/dev/i2c-20:/dev/i2c-20" + - "/dev/i2c-21:/dev/i2c-21" environment: - PYTHONUNBUFFERED=1