docker-apps/mediaelch/mediaelch_jm.txt
2025-04-03 22:57:52 +02:00

65 lines
2.0 KiB
Plaintext

Create user and group
---------------------
Credentials -> Local Users -> Add
Full Name: mediaelch
Username: mediaelc
Disable Password: <select>
Email: stuurmcp@telkomsa.net
UID: (note)
Create New Primary Group: <select>
Create Home Directory: <uncheck>
Samba Authentication: <uncheck>
Save
mediaelc UID: 3042
mediaelc GID: 3017 #3041
If not done already, add mapping for media on container config
--------------------------------------------------------------
In this example: the folder where media is stored is /mnt/stpool1/NData1/Media
On Truenas shell:
jlmkr edit docker
Add the following args to "systemd_nspawn_user_args":
--bind='/mnt/stpool1/NData1/Media:/mnt/media'
If not done already, set ACL permissions for media to be accessible by media group
----------------------------------------------------------------------------------
On Truenas shell:
# read and note acl entries
getfacl /mnt/stpool1/NData1
getfacl /mnt/stpool1/NData1/Media
# set read and execute permissions for media group on parent folder
setfacl -m g:media:5 /mnt/stpool1/NData1
# set full permissions for media group on Media folder recursively
setfacl -R -m g:media:7 /mnt/stpool1/NData1/Media
# modify defaults recursively
setfacl -R -d -m g:media:7 /mnt/stpool1/NData1/Media
# NB! if you want to remove all acl entries from a folder recursively, use setfacl -b -R <foldername>
Create datasets
---------------
# In Truenas shell:
# list datasets
zfs list | grep -i "docker.*mediaelch"
# create following datasets if not present
zfs create SSD1/docker/data/mediaelch
zfs create SSD1/docker/data/mediaelch/config
chown -R mediaelc:mediaelc /mnt/SSD1/docker/data/mediaelch
Create folder
-------------
# In Truenas shell:
mkdir -p /mnt/SSD1/docker/stacks/mediaelch
Copy folder to docker stacks
----------------------------
# In Windows cmd shell in mediaelch folder, enter:
./cp2nas
# or
pscp -P 22 -r stacks/*.* root@192.168.2.2:/mnt/SSD1/docker/stacks/mediaelch/
# This should copy mediaelch stacks folder to /mnt/SSD1/docker/stacks/mediaelch