Using Docker on TrueNAS
Create user and directory
In order to avoid problems caused by directory permissions, please create a data set for storing MT Photos data and App backup photos in the storage pool;
- Create a user in users
- Create a user group in the user group
- Add mtphotos and sub-datasets config and upload to the dataset
- In the permissions of the dataset, change the owner to the corresponding user and user group
If you have created users and user groups before, you can skip steps 1 and 2
Add a directory to the application
- Click [Apps] in the left navigation bar
- Click the [Add Directory] button on the top toolbar
- Enter the directory name mt-photos
- Repository input https://gitee.com/mt-photos/charts.git or https://github.com/MT-Photos/charts.git
It is recommended to use gitee in China to avoid failure to update the directory due to network problems
Install the app
- Find mtphotos in the available apps, you can search above;
- Click Install, and then select /config and /upload directories to be mapped;
- Add other directory mappings according to whether there are other photo directories that need to be mapped;
- Other parts do not need to be modified, click Save below
If the installation application encounters an error:
Following service(s) uses this path: SMB Share
, you can uncheck [Enable Host Path (Host Path) security check] in Application -> Settings -> Advanced Settings and save it.See the reason: https://truecharts.org/news/hostpath-validation/
Installation process video
Notice:
-
The uid corresponding to user nero is 1000, and the gid corresponding to user group nero is 1000. If the user and user group id you created are not 1000, please modify the ownerUID and ownerGID
-
Existing photos and videos are mapped to the directory address name in docker, please do not have the same name as
system directory
;List of
system directories
: /bin, /boot, /dev, /etc, /home, /lib, /media, /mnt, /opt, /proc, /root, /run, /sbin, /srv, /sys , /tmp, /usr, /var, /lib64, /config
Access the web page
In the installed application, wait for the application to pull the image;
When waiting for the status of the application to be ACTIVE, you can click the [Web Portal] button of mt-photos to access the web page