Visual Studio Code – Adding GitLab repository

How do you setup a GitLab repo on Microsoft Visual Code?

There are two main scenarios –

  1. You have the code on your workstation and you want to push into a clean / new repository
  2. You want to pull code from an existing gitlab repository onto your workstation

First go to your local folder on your workstation (either empty or full of code)

git init 
git add .
git remote add origin https://<username>:<usertoken>@gitlaburl.com/project/repo.git

The above commands tell git to run initial setup, add current folder as content then add associated remote gitlab repository.

Note the format to use while using a user token. The user token is issued by GitLab, your username will also be there. You will need to ensure that your token has both read and write access to the repository.

Unifi Video Controller NVR for UNRAID

If you run UNRAID at home and you have a UniFi Camera system then check out my latest container….

https://hub.docker.com/r/superd/unifi-nvr/

A dockerised UniFi NVR

Ubiquiti UniFi-Video-Controller (NVR) — Docker Container

Ubuntu 16.04, UniFi-Video-Controller 3.8.3

Setup / Quick Start

docker run \
--net=host \
-v /var/lib/unifi-video/:<YOUR DATA DIR> \
-v /var/log/unifi-video/:<YOUR LOG DIR> \
superd/unifi-nvr

Troubleshooting

UNRAID – If you have issue with MongoDB continually restarting please check your data mapping. I have seen issues where user shares do not work correctly. Please try mapping direct to a single disk or to cache drive to ensure smooth operation.

i.e. instead of /mnt/user/usershare/nvr/data  use  /mnt/disk1/usershare/nvr/data

Update 4/02/2020 ;

I would recommend using this docker image – https://hub.docker.com/r/pducharme/unifi-video-controller/ 

I have found that i no longer require a direct disk mapping as stated above, the built in DB seems to work fine on user shares. Unraid 6.8.2 

New Commandline as per follows; 

docker create --name='unifi-video-controller' 
--net='host'
-e TZ="Pacific/Auckland"
-e HOST_OS="Unraid"
-e 'PUID'='99'
-e 'PGID'='100'
-v '/mnt/user/appdata-unifi/unifi-video/':'/var/lib/unifi-video':'rw'
-v '/mnt/user/appdata-unifi/unifi-video/videos/':'/usr/lib/unifi-video/data/videos':'rw'
'pducharme/unifi-video-controller'

I use ‘host’ network mappings just as there are a ton of ports and i’m lazy – use bridge ports if you want to reduce footprint.