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

79 lines
2.4 KiB
Plaintext

https://github.com/songkonginc/pms-docker
Create user and group
---------------------
Credentials -> Local Users -> Add
Full Name: songkong
Username: songkong
Disable Password: <select>
Email: stuurmcp@telkomsa.net
UID: (note)
Create New Primary Group: <select>
Create Home Directory: <uncheck>
Samba Authentication: <uncheck>
Save
songkong UID: 3052
songkong GID: 3051
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.*songkong"
# create following dataset if not present
zfs create SSD1/docker/data/songkong
zfs create SSD1/docker/data/songkong/config
chown -R songkong:songkong /mnt/SSD1/docker/data/songkong
Create folder
-------------
mkdir /mnt/SSD1/docker/stacks/songkong
Copy folder to docker stacks
----------------------------
In Windows cmd shell in songkong folder, enter:
./cp2nas
# or
pscp -P 22 -r stacks/*.* root@192.168.2.2:/mnt/SSD1/docker/stacks/songkong/
Migrating data from old songkong (source) to newly installed one (target)
-------------------------------------------------------------------------
Stop old/source songkong
heavyscript app --stop songkong
Stop new/target songkong media server
On Dockge, select songkong and click stop
Copy the source Library to target folder:
cp -rp /mnt/stpool1/apps/songkong/. /mnt/SSD1/docker/data/songkong/config/
chown -R songkong:songkong /mnt/SSD1/docker/data/songkong
chmod -R o-rw /mnt/SSD1/docker/data/songkong/config/