Skip to content

Commit

Permalink
fix: address additional PR feedback and cleaned up Make targets and d…
Browse files Browse the repository at this point in the history
…ocker compose

Signed-off-by: Sean O'Hair <[email protected]>
  • Loading branch information
seanohair22 committed Oct 25, 2023
1 parent 2d1c56f commit a56652e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 42 deletions.
23 changes: 9 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GOREPOS=device-scale event-reconciler loss-detector product-lookup
.PHONY: $(REPOS)

DOCKER_TAG=dev
STACK_NAME=loss-detection

docker-rm:
-docker rm $$(docker ps -aq)
Expand All @@ -18,33 +19,27 @@ clean-docker: docker-rm
docker network prune -f

run-portainer:
cd ./loss-detection-app && docker compose -f docker-compose.portainer.yml up -d
cd ./loss-detection-app && docker compose -p portainer -f docker-compose.portainer.yml up -d

run-edgex:
cd ./loss-detection-app && docker compose -f docker-compose.edgex.yml up -d
cd ./loss-detection-app && docker compose -p ${STACK_NAME} -f docker-compose.edgex.yml up -d

run-base:
cd ./loss-detection-app && \
docker compose -f docker-compose.edgex.yml up -d && \
docker compose -f docker-compose.loss-detection.yml up -d
docker compose -p ${STACK_NAME} -f docker-compose.edgex.yml -f docker-compose.loss-detection.yml up -d

run-vap: models run-base
run-vap: models
cd ./loss-detection-app && \
docker compose -f docker-compose.vap.yml up -d
docker compose -p ${STACK_NAME} -f docker-compose.edgex.yml -f docker-compose.loss-detection.yml -f docker-compose.vap.yml up -d

run-full: run-vap

down:
cd ./loss-detection-app && \
docker compose -f docker-compose.vap.yml down && \
docker compose -f docker-compose.loss-detection.yml down && \
docker compose -f docker-compose.edgex.yml down
docker compose -p ${STACK_NAME} -f docker-compose.edgex.yml -f docker-compose.loss-detection.yml -f docker-compose.vap.yml down -v

vap-down:
cd ./loss-detection-app && \
docker compose -f docker-compose.vap.yml down && \
docker compose -f docker-compose.loss-detection.yml down && \
docker compose -f docker-compose.edgex.yml down
down-portainer:
cd ./loss-detection-app && docker compose -p portainer -f docker-compose.portainer.yml down

models:
if [ ! -d pipeline-server ] ; then git clone https://github.com/dlstreamer/pipeline-server; fi && \
Expand Down
25 changes: 12 additions & 13 deletions loss-detection-app/docker-compose.edgex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# NOTE: this Docker Compose file does not contain the security services - namely the API Gateway
# and Secret Store
networks:
loss-detection-app_edgex-network:
name: loss-detection-app_edgex-network
edgex-network:
driver: bridge
services:
core-command:
Expand All @@ -39,7 +38,7 @@ services:
hostname: edgex-core-command
image: edgexfoundry/core-command:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand All @@ -63,7 +62,7 @@ services:
hostname: edgex-core-consul
image: hashicorp/consul:1.15.2
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand Down Expand Up @@ -102,7 +101,7 @@ services:
hostname: edgex-core-data
image: edgexfoundry/core-data:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand All @@ -119,7 +118,7 @@ services:
hostname: edgex-redis
image: redis:7.0.11-alpine
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand Down Expand Up @@ -158,7 +157,7 @@ services:
hostname: edgex-device-mqtt
image: edgexfoundry/device-mqtt:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand Down Expand Up @@ -188,7 +187,7 @@ services:
hostname: edgex-device-rest
image: edgexfoundry/device-rest:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand All @@ -215,7 +214,7 @@ services:
hostname: edgex-core-metadata
image: edgexfoundry/core-metadata:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand All @@ -236,7 +235,7 @@ services:
hostname: edgex-mqtt-broker
image: eclipse-mosquitto:2.0.15
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand All @@ -263,7 +262,7 @@ services:
hostname: edgex-support-notifications
image: edgexfoundry/support-notifications:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
host_ip: 127.0.0.1
Expand All @@ -283,7 +282,7 @@ services:
hostname: edgex-ui-go
image: edgexfoundry/edgex-ui:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
ports:
- mode: ingress
target: 4000
Expand All @@ -310,7 +309,7 @@ services:
hostname: edgex-core-common-config-bootstrapper
image: edgexfoundry/core-common-config-bootstrapper:3.0.0
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
read_only: true
security_opt:
- no-new-privileges:true
Expand Down
13 changes: 4 additions & 9 deletions loss-detection-app/docker-compose.loss-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@

version: '3.7'

networks:
loss-detection-app_edgex-network:
name: loss-detection-app_edgex-network
driver: bridge

volumes:
db_vol: {}
pos_vol: {}
Expand All @@ -34,7 +29,7 @@ services:
container_name: event-reconciler
hostname: event-reconciler
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
environment:
EDGEX_SECURITY_SECRET_STORE: "false"
SERVICE_HOST: event-reconciler
Expand All @@ -48,7 +43,7 @@ services:
container_name: device-scale
hostname: device-scale
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
environment:
EDGEX_SECURITY_SECRET_STORE: "false"
SERVICE_HOST: device-scale
Expand All @@ -67,7 +62,7 @@ services:
container_name: product-lookup
hostname: product-lookup
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
security_opt:
- no-new-privileges:true

Expand All @@ -79,7 +74,7 @@ services:
container_name: loss-detector
hostname: loss-detector
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
environment:
CLIENTS_CORE_COMMAND_HOST: edgex-core-command
EDGEX_SECURITY_SECRET_STORE: "false"
Expand Down
8 changes: 2 additions & 6 deletions loss-detection-app/docker-compose.vap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

version: '3.7'

networks:
loss-detection-app_edgex-network:
external: true

services:
cv-region-of-interest:
image: rtsf-at-checkout/cv-region-of-interest:dev
Expand All @@ -40,7 +36,7 @@ services:
- CAMERA0_FRAME_STORE=/tmp/my-frame-store
user: "${UID}:${GID}"
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
volumes:
- /tmp:/tmp
depends_on:
Expand All @@ -55,7 +51,7 @@ services:
hostname: pipeline-server
privileged: true
networks:
loss-detection-app_edgex-network: {}
edgex-network: {}
environment:
- ENABLE_RTSP=true
- EMIT_SOURCE_AND_DESTINATION=true
Expand Down

0 comments on commit a56652e

Please sign in to comment.