Skip to content

Commit

Permalink
Update docker compose config
Browse files Browse the repository at this point in the history
  • Loading branch information
jhh committed Jan 24, 2024
1 parent 8bfcba2 commit 99f046c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
19 changes: 19 additions & 0 deletions docker/deadeye.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description=Deadeye
After=docker.service
Requires=docker.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c '\
CAMERA_DEV=$(readlink --canonicalize --no-newline /dev/v4l/by-id/usb-Microsoft_Microsoft®_LifeCam_HD-3000-video-index0) \
docker compose -f /home/orangepi/deadeye/docker-compose.yml up --detach \
'
ExecStop=/bin/bash -c '\
CAMERA_DEV=$(readlink --canonicalize --no-newline /dev/v4l/by-id/usb-Microsoft_Microsoft®_LifeCam_HD-3000-video-index0) \
docker compose -f /home/orangepi/deadeye/docker-compose.yml stop \
'

[Install]
WantedBy=multi-user.target
8 changes: 4 additions & 4 deletions docker-compose.yml → docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ x-common-environment: &common-environment
DEADEYE_NT_PORT: 1735

x-common-restart: &common-restart
restart: always
restart: on-failure

volumes:
upload_data:
Expand All @@ -24,10 +24,10 @@ services:
- upload_data:/upload
devices:
- /dev/gpiochip0
- /dev/video0
environment:
- "${CAMERA_DEV}:/dev/lifecam"
environment:
<<: *common-environment
DEADEYE_STREAM_HOST: 10.27.67.11
DEADEYE_STREAM_HOST: 10.27.67.219
<<: *common-restart
admin:
image: j3ff/deadeye-admin
Expand Down

0 comments on commit 99f046c

Please sign in to comment.