Dockerfile and docker-compose work

This commit is contained in:
Moises Martinez 2024-02-27 06:33:04 +00:00
parent 5c58be3aa8
commit bc4bc9afdb
3 changed files with 6 additions and 4 deletions

View file

@ -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

View file

@ -1,2 +1,2 @@
pyyaml>=6.0
paho-mqtt>=1.6.1
paho-mqtt==1.6.1

View file

@ -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