Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://github.com/doitandbedone/ispyagentdvr-docker

https://www.ispyconnect.com/download.aspx

Compose:

Note: hostname MUST = `ubuntu`

WD=/opt/ispyagentdvr
mkdir -p $WD/{setup,conf,data}
cd $WD/setup
cat << 'EOF' >docker-compose.yaml
version: '3.7'

services:
 ispyagentdvr:
    container_name: ispyagentdvr
    image: doitandbedone/ispyagentdvr:latest
    hostname: ubuntu
    ports:
      - '8090:8090/tcp'
      - '3478:3478/udp'
      - '50000-50010:50000-50010/udp'

    volumes:
      - type: bind
        source: /opt/ispyagentdvr/conf/
        target: /agent/Media/XML/
      - type: bind
        source: /opt/ispyagentdvr/data/
        target: /agent/Media/WebServerRoot/Media/

    environment:
      - 'TZ=America/Whitehorse'

EOF
chmod +x docker-compose.yaml


systemctl:

WD=/opt/ispyagentdvr/setup
cat << EOF >$WD/ispyagentdvr.service.setup.sh
cat << EOL >/lib/systemd/system/ispyagentdvr.service
[Unit]
Description=ispyagentdvr_Docker
Requires=docker.service network-online.target

[Service]

Restart=on-abnormal
ExecStart=/usr/bin/docker-compose --project-name ispyagentdvr --project-directory $WD -f $WD/docker-compose.yaml up
ExecStop=/usr/bin/docker-compose --project-name ispyagentdvr --project-directory $WD -f $WD/docker-compose.yaml stop

[Install]
WantedBy=multi-user.target
EOL
systemctl enable ispyagentdvr
systemctl restart ispyagentdvr
systemctl status ispyagentdvr
EOF
chmod +x $WD/ispyagentdvr.service.setup.sh
$WD/ispyagentdvr.service.setup.sh

bash cli alias:

echo 'alias ispycli="docker exec -it ispyagentdvr /bin/bash"' >> ~/.bashrc
source ~/.bashrc

  • No labels