add: edge docker-compose.yaml
This commit is contained in:
parent
9a179e09e9
commit
b65670861d
2
edge/.gitignore
vendored
Normal file
2
edge/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
venv
|
||||
app.log
|
||||
48
edge/docker/docker-compose.yaml
Normal file
48
edge/docker/docker-compose.yaml
Normal file
@ -0,0 +1,48 @@
|
||||
version: "3.9"
|
||||
# name: "road_vision"
|
||||
services:
|
||||
mqtt:
|
||||
image: eclipse-mosquitto
|
||||
container_name: mqtt
|
||||
volumes:
|
||||
- ./mosquitto:/mosquitto
|
||||
- ./mosquitto/data:/mosquitto/data
|
||||
- ./mosquitto/log:/mosquitto/log
|
||||
ports:
|
||||
- 1883:1883
|
||||
- 19001:9001
|
||||
networks:
|
||||
mqtt_network:
|
||||
|
||||
|
||||
edge:
|
||||
container_name: edge
|
||||
build: ../
|
||||
depends_on:
|
||||
- mqtt
|
||||
environment:
|
||||
MQTT_BROKER_HOST: "mqtt"
|
||||
MQTT_BROKER_PORT: 1883
|
||||
MQTT_TOPIC: " "
|
||||
HUB_HOST: "store"
|
||||
HUB_PORT: 8000
|
||||
HUB_MQTT_BROKER_HOST: "mqtt"
|
||||
HUB_MQTT_BROKER_PORT: 1883
|
||||
HUB_MQTT_TOPIC: "processed_data_topic"
|
||||
networks:
|
||||
mqtt_network:
|
||||
edge_hub:
|
||||
|
||||
|
||||
networks:
|
||||
mqtt_network:
|
||||
db_network:
|
||||
edge_hub:
|
||||
hub:
|
||||
hub_store:
|
||||
hub_redis:
|
||||
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
pgadmin-data:
|
||||
11
edge/docker/mosquitto/config/mosquitto.conf
Normal file
11
edge/docker/mosquitto/config/mosquitto.conf
Normal file
@ -0,0 +1,11 @@
|
||||
persistence true
|
||||
persistence_location /mosquitto/data/
|
||||
listener 1883
|
||||
## Authentication ##
|
||||
allow_anonymous true
|
||||
# allow_anonymous false
|
||||
# password_file /mosquitto/config/password.txt
|
||||
## Log ##
|
||||
log_dest file /mosquitto/log/mosquitto.log
|
||||
log_dest stdout
|
||||
# listener 1883
|
||||
14
edge/main.py
14
edge/main.py
@ -23,14 +23,14 @@ if __name__ == "__main__":
|
||||
],
|
||||
)
|
||||
# Create an instance of the StoreApiAdapter using the configuration
|
||||
hub_adapter = HubHttpAdapter(
|
||||
api_base_url=HUB_URL,
|
||||
)
|
||||
# hub_adapter = HubMqttAdapter(
|
||||
# broker=HUB_MQTT_BROKER_HOST,
|
||||
# port=HUB_MQTT_BROKER_PORT,
|
||||
# topic=HUB_MQTT_TOPIC,
|
||||
# hub_adapter = HubHttpAdapter(
|
||||
# api_base_url=HUB_URL,
|
||||
# )
|
||||
hub_adapter = HubMqttAdapter(
|
||||
broker=HUB_MQTT_BROKER_HOST,
|
||||
port=HUB_MQTT_BROKER_PORT,
|
||||
topic=HUB_MQTT_TOPIC,
|
||||
)
|
||||
# Create an instance of the AgentMQTTAdapter using the configuration
|
||||
agent_adapter = AgentMQTTAdapter(
|
||||
broker_host=MQTT_BROKER_HOST,
|
||||
|
||||
@ -1,43 +1,10 @@
|
||||
absl-py==2.0.0
|
||||
annotated-types==0.5.0
|
||||
astunparse==1.6.3
|
||||
cachetools==5.3.2
|
||||
certifi==2023.7.22
|
||||
charset-normalizer==3.2.0
|
||||
flatbuffers==23.5.26
|
||||
gast==0.5.4
|
||||
google-auth==2.25.2
|
||||
google-auth-oauthlib==1.2.0
|
||||
google-pasta==0.2.0
|
||||
grpcio==1.60.0
|
||||
h5py==3.10.0
|
||||
idna==3.4
|
||||
keras==2.15.0
|
||||
libclang==16.0.6
|
||||
Markdown==3.5.1
|
||||
MarkupSafe==2.1.3
|
||||
ml-dtypes==0.2.0
|
||||
numpy==1.26.2
|
||||
oauthlib==3.2.2
|
||||
opt-einsum==3.3.0
|
||||
packaging==23.2
|
||||
annotated-types==0.6.0
|
||||
certifi==2024.2.2
|
||||
charset-normalizer==3.3.2
|
||||
idna==3.6
|
||||
paho-mqtt==1.6.1
|
||||
protobuf==4.23.4
|
||||
pyasn1==0.5.1
|
||||
pyasn1-modules==0.3.0
|
||||
pydantic==2.3.0
|
||||
pydantic_core==2.6.3
|
||||
pydantic==2.6.1
|
||||
pydantic_core==2.16.2
|
||||
requests==2.31.0
|
||||
requests-oauthlib==1.3.1
|
||||
rsa==4.9
|
||||
six==1.16.0
|
||||
tensorboard==2.15.1
|
||||
tensorboard-data-server==0.7.2
|
||||
tensorflow==2.15.0.post1
|
||||
tensorflow-estimator==2.15.0
|
||||
tensorflow-io-gcs-filesystem==0.34.0
|
||||
termcolor==2.4.0
|
||||
typing_extensions==4.7.1
|
||||
urllib3==2.0.4
|
||||
Werkzeug==3.0.1
|
||||
wrapt==1.14.1
|
||||
typing_extensions==4.9.0
|
||||
urllib3==2.2.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user