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 . . COPY . .
# Build the extension module # 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 # Install Python dependencies for the ddc-mqtt project
RUN pip install --no-cache-dir -r ./ddc-mqtt/requirements.txt RUN pip install --no-cache-dir -r ./ddc-mqtt/requirements.txt

View file

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

View file

@ -2,9 +2,11 @@ version: '3.8'
services: services:
app: app:
build: . build: .
network_mode: "host"
volumes: volumes:
- .:/usr/src/app - .:/usr/src/app
ports: devices:
- "8000:8000" # Adjust the left side to the port you want to expose on the host - "/dev/i2c-20:/dev/i2c-20"
- "/dev/i2c-21:/dev/i2c-21"
environment: environment:
- PYTHONUNBUFFERED=1 - PYTHONUNBUFFERED=1