Fuck docker
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements-base.txt .
|
||||
RUN pip install --no-cache-dir -r requirements-base.txt
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV FLASK_APP=app.py
|
||||
ENV FLASK_RUN_HOST=0.0.0.0
|
||||
ENV FLASK_RUN_PORT=5000
|
||||
|
||||
EXPOSE 5000
|
||||
CMD ["python", "main.py"]
|
||||
@@ -1,20 +1,20 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
system-api:
|
||||
build: .
|
||||
container_name: "system-api"
|
||||
ports:
|
||||
- "5000:5000"
|
||||
depends_on:
|
||||
- mosquitto
|
||||
environment:
|
||||
- LOCAL_BROKER_USERNAME=system
|
||||
- LOCAL_BROKER_PASSWORD=hepl
|
||||
- LOCAL_BROKER_ADDRESS=system-broker
|
||||
- LOCAL_BROKER_PORT=1883
|
||||
- API_BROKER_ADDRESS=192.168.15.125
|
||||
- API_BROKER_PORT=1883
|
||||
otbr:
|
||||
image: openthread/border-router
|
||||
container_name: otbr
|
||||
network_mode: "host"
|
||||
restart: always
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/ttyACM0:/dev/ttyACM0
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
volumes:
|
||||
- /var/lib/otbr:/data
|
||||
env_file:
|
||||
- otbr-env.list
|
||||
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto:latest
|
||||
|
||||
13
rpi/deploy.sh
Normal file
13
rpi/deploy.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
git pull
|
||||
docker compose down
|
||||
|
||||
if [ "$1" != "preserve" ]; then
|
||||
docker compose build --no-cache
|
||||
fi
|
||||
|
||||
docker compose up -d --force-recreate
|
||||
|
||||
source ./bin/activate
|
||||
python3 ./main.py
|
||||
4
rpi/otbr-env.list
Normal file
4
rpi/otbr-env.list
Normal file
@@ -0,0 +1,4 @@
|
||||
OT_RCP_DEVICE=spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=1000000
|
||||
OT_INFRA_IF=wlan0
|
||||
OT_THREAD_IF=wpan0
|
||||
OT_LOG_LEVEL=7
|
||||
@@ -1,3 +0,0 @@
|
||||
numpy
|
||||
opencv-python
|
||||
ultralytics
|
||||
@@ -1,8 +1,15 @@
|
||||
flask
|
||||
python_dateutil
|
||||
setuptools
|
||||
urllib3
|
||||
pydantic
|
||||
typing-extensions
|
||||
requests
|
||||
python-dotenv
|
||||
pydantic
|
||||
paho-mqtt
|
||||
pyyaml
|
||||
pyserial
|
||||
grovepi
|
||||
opencv-python
|
||||
numpy
|
||||
ultralytics
|
||||
torch
|
||||
flask
|
||||
paho-mqtt
|
||||
|
||||
Reference in New Issue
Block a user