Hi, I am new to TrueNAS Scale and an amateur / hobbyist, so please be gentle!
Hardware: The setup is a Jonsbo N1 Case, the CPU is an N100 with 32Gb RAM. It contains a couple of pools, one is a small 1 Tb Pool consisting of two disks mirrored, the other is a mirrored 12Tb pool for backups. My Task: On the smaller 1Tb Pool I would like to add a simple Web, PHP and SQL server, NodeRed would also be handy if possible. I have set up LAMP servers on a Raspberry Pi and would like to replicate something similar here. It is only to handle my own IOT projects.
I have looked on forums and YouTube but my requirement is obviously a long way from commercial setups so I have not found much advice.
Do I set up custom apps? I have been trying to understand Kubernetes, is that the answer? Should I use a VM with a light weight linux install and just go LAMP? If so, what distro of linux would you recommend?
Any advice is gratefully received. Thanks.
Edit: Debian seems to be the light Distro of choice, unless there are any strong opinions on here Iâll probably go with a Debian LAMP in a VM
You can set the ports up to your liking. Note you can also insert / mount your own config files e.g. php.ini, .htpasswd, default.conf and website (index.html etc) files by mounting volumes as above.
The directories can easily be mounted and managed using (for example) WinSCP or Filezilla. Using stuxâs recommended docker/dockge setup, your base nginx directory will be /mnt/tank/docker/stacks/nginx/
Hi, Thanks for the help. I have managed to get Capt Stux jailmaker working. I am stuck on the LEMP bit though. I have tried to compose for a simple nginx installation. my compose file is as follows:
I have gone to /mnt/ReadyNAS-1Tb/docker/data/nginx/www in Putty and have touched an html file there, index.html, I have entered some html boilerplate. Despite refreshing, the nginx is still showing me the standard nginx landing page though, not my boiler plate. I have gone into /mnt/ReadyNAS-1Tb/docker/data/nginx/config/ and there is no config folder?
The deployment should generate its own config files and folder structures. However, the (optional) reason for specifying these in the docker compose is to allow you to have custom configurations (in the case of the nginx.conf file) and to specify the location of the /www files you wish to serve. It also means when the container is rebuilt / updated, that you donât have to manually update / edit the files each time - they will be mounted into the docker container when itâs rebuilt.
For volumes, the left side of the colon is the host system path. The right side of the colon is the mount point in the container. So:
â- ./www:/var/www/htmlâ will mount the host directory âwwwâ into the nginx container at /var/www/html.
â- ./default.conf:/etc/nginx/conf.d/default.confâ will mount the file âdefault.confâ on the host system into the nginx container as /etc/nginx/conf.d/default.conf.
I have had some trouble with mounts too, including where it mounts the file (e.g. php.ini as a directory, rather than inserting it as a file, and Iâm not sure why. However, the LEMP stack compose I posted seems to work as intended!
In your case, make sure that â/mnt/ReadyNAS-1Tb/docker/data/nginx/wwwâ is mounted properly in the jailmkr jail which is hosting your docker/dockge install. You can do this in TrueNAS shell with âjlmkr edit dockerâ, and adjusting the mounts e.g. --bind=â/mnt/ReadyNAS-1Tb/docker/data/nginx/www:/wwwâ
You should then be able to navigate to â/wwwâ on the docker host and find your www files.
I should also add, Iâm no expert, having just learnt this stuff a month or so ago when Ix and Truecharts decided to ditch the kubernetes apps system and move to docker.
I have tried a new yaml file and I am still no further forward. I am really regretting nginx and wish that I had stuck with Apache, which I know isnât the new shiny server but seems to be a lot more robust.
Following starting this, when I go into the mnt directory on TrueNAS via putty I can see that there is a new nginx directory, containing the following files / sub directories in it: compose.yaml, templates, www.
Unfortunately all are empty.
The NGINX landing page is still there but it is impossible to change it. Apache is so simple, you just go into www, add a new index.html and it just works out of the box. I was expecting the same from NGINX.