containers test

This commit is contained in:
the 2024-12-04 21:33:02 +04:00
parent 5fa9c76b99
commit 71bc31d0bd
4 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,11 @@
FROM python:latest
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY GreenhouseDetector/detector.py .
CMD ["python", "detector.py"]

View File

@ -0,0 +1,11 @@
FROM python:latest
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY GreenhouseManager/manager.py .
CMD ["python", "manager.py"]

View File

@ -78,3 +78,21 @@ services:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
KAFKA_CLUSTERS_0_METRICS_PORT: 9997
#manager_py_service:
# container_name: manager_py
# build:
# context: .
# dockerfile: ./GreenhouseManager/Dockerfile
# depends_on:
# - kafka
#detector_py_service:
# container_name: detector_py
# build:
# context: .
# dockerfile: ./GreenhouseDetector/Dockerfile
# depends_on:
# - kafka
# expose:
# - 20002

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
kafka-python~=2.0.2
Flask~=3.0.3
requests~=2.31.0