Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://shinobi.video/docs/

https://gitlab.com/Shinobi-Systems/Shinobi/-/tree/dev/Docker

First I ran this and checked the output:

bash <(curl -s https://gitlab.com/Shinobi-Systems/Shinobi-Installer/raw/master/shinobi-docker.sh)

compose:

Note: you'll need your "PLUGIN_KEY" from above

WD=/opt/Shinobi
mkdir -p $WD/{customAutoLoad,database,videos,plugins,docker-plugins,setup,conf}
cd $WD/setup
cat << 'EOF' >docker-compose.yaml
version: "3"
services:
    shinobi:
        image: shinobisystems/shinobi:dev
        container_name: Shinobi
        networks:
           - shinobinet
        volumes:
           - type: bind
             source: /opt/Shinobi/conf/
             target: /config
           - type: bind
             source: /opt/Shinobi/customAutoLoad/
             target: /home/Shinobi/libs/customAutoLoad
           - type: bind
             source: /opt/Shinobi/database/
             target: /var/lib/mysql
           - type: bind
             source: /opt/Shinobi/videos/
             target: /home/Shinobi/videos
           - type: bind
             source: /opt/Shinobi/plugins/
             target: /home/Shinobi/plugins
           - type: bind
             source:  /dev/shm/Shinobi/streams/
             target: /dev/shm/streams
           - type: bind
             source: /etc/localtime
             target: /etc/localtime
             read_only: true
                        
        ports:
           - 8652:8080
           
        environment:
           - 'TZ=America/Whitehorse'
           - PLUGIN_KEYS={"Tensorflow":""}
           - SSL_ENABLED=false

    shinobiplugintensorflow:
        image: shinobisystems/shinobi-tensorflow:latest
        container_name: shinobi-tensorflow
        networks:
           - shinobinet
        environment:
          - PLUGIN_KEY=
          - PLUGIN_HOST=Shinobi
        volumes:
          - /opt/Shinobi/docker-plugins/tensorflow:/config
        environment:
          - 'TZ=America/Whitehorse'

networks:
  shinobinet:
    driver: bridge

EOF
chmod +x docker-compose.yaml
systemctl start Shinobi
systemctl status Shinobi

systemd:

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

[Service]

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

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

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

Access:

http://localhost:8652/super 

Username: admin@shinobi.video

Password: admin

nginx:

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto http;
        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;
  • No labels