Dockerfile and docker-compose work
This commit is contained in:
parent
5c58be3aa8
commit
bc4bc9afdb
3 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
pyyaml>=6.0
|
pyyaml>=6.0
|
||||||
paho-mqtt>=1.6.1
|
paho-mqtt==1.6.1
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue