Skip to content

Instantly share code, notes, and snippets.

@ebruning
Last active December 5, 2016 19:26
Show Gist options
  • Save ebruning/e0eaebee63254fafe4b0935682e3ef38 to your computer and use it in GitHub Desktop.
Save ebruning/e0eaebee63254fafe4b0935682e3ef38 to your computer and use it in GitHub Desktop.
nas build
# docker-compose up -d
sabnzbd:
image: "sabnzbd/sabnzbd"
container_name: "sabnzbd"
volumes:
- "/opt/appdata/sabnzbd:/datadir"
- "/mnt/volume01/movies:/movies"
- "/mnt/volume01/downloads:/downloads"
ports:
- "8080:8080"
restart: always
couchpotato:
image: "couchpotato/couchpotato"
container_name: "couchpotato"
environment:
#- PUID=${PUID}
- PGID=999
volumes:
- "/opt/appdata/couchpotato:/datadir"
- "/mnt/volume01/movies:/media"
ports:
- "5050:5050"
restart: always
sickgear:
image: "ressu/sickgear"
container_name: "sickgear"
volumes:
- "/opt/appdata/sickgear:/data"
- "/mnt/volume01/tv:/tv"
ports:
- "8081:8081"
restart: always
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/mnt/volume01/downloads 172.16.1.0/255.255.255.0(rw,no_subtree_check,insecure,fsid=0,all_squash,anonuid=5000,anongid=5000)
/mnt/volume01/movies 172.16.1.0/255.255.255.0(rw,no_subtree_check,insecure,fsid=1,all_squash,anonuid=5000,anongid=5000)
/mnt/volume01/tv 172.16.1.0/255.255.255.0(rw,no_subtree_check,insecure,fsid=2,all_squash,anonuid=5000,anongid=5000)
/mnt/volume01/proxmox 172.16.1.0/255.255.255.0(rw,no_subtree_check,insecure,fsid=3,all_squash,anonuid=5001,anongid=5001)
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/ds02--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=87c59bf2-5ad3-4a1c-9bd7-c9c417164899 /boot ext2 defaults 0 2
/dev/mapper/ds02--vg-swap_1 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
# docker
/dev/sdb1 /mnt/data/docker xfs defaults 0 2
# mergerfs
/dev/sdc1 /mnt/data/disk01 xfs defaults 0 2
/dev/sdd1 /mnt/data/disk02 xfs defaults 0 2
/dev/sde1 /mnt/data/disk03 xfs defaults 0 2
/dev/sdf1 /mnt/data/disk04 xfs defaults 0 2
/dev/sdg1 /mnt/data/disk05 xfs defaults 0 2
/dev/sdh1 /mnt/data/disk06 xfs defaults 0 2
/mnt/data/* /mnt/volume01 fuse.mergerfs category.create=eplfs,moveonenospc=true,defaults,allow_other,minfreespace=20G,fsname=storage 0 0

Permissions create media user/group 5000 groupadd --gid=5001 media adduser --no-create-home --gid=5001 --uid=5000 media create proxmox user/group 5001 groupadd --gid=5001 proxmox adduser --no-create-home --gid=5001 --uid=5001 proxmox

MergerFS

http://zackreed.me/mergerfs-another-good-option-to-pool-your-snapraid-disks/

apt-get install xfsprogs fuse

Snapraid http://www.havetheknowhow.com/Configure-the-server/Install-SnapRAID.html

Docker https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit

curl -L "https://github.com/docker/compose/releases/download/1.8.1/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

/opt/appdata/sickgear /opt/appdata/sabnzbd /opt/appdata/couchpotato

[global]
workgroup = WORKGROUP
server string = ds02 Server %v
netbios name = ds02an
security = user
map to guest = bad user
dns proxy = no
[downloads]
comment = media downloads
path = /mnt/volume01/downloads
valid users = @media
force group = users
create mask = 0775
directory mask = 0771
writable = yes
[movies]
comment = movies
path = /mnt/volume01/movies
valid users = @media
force group = users
create mask = 0775
directory mask = 0771
writable = yes
[tv]
comment = tv shows
path = /mnt/volume01/tv
valid users = @media
force group = users
create mask = 0775
directory mask = 0771
writable = yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment