Hello.
Is it possible to change location of “tmp” dir and how?
For example now my tmp dir is in /var/discourse/tmp
and i want temp files to be created in /tmp/discourse-tmp
AI-generated summary
The discussion revolves around changing the location of the “tmp” directory in Discourse. Nikolay initiated the conversation, seeking a solution to move the tmp directory from /var/discourse/tmp to /tmp/discourse-tmp. The motivation behind this request is due to issues arising from mounting the Discourse directory from a Windows host to a Linux Docker container, using a shared directory with a case-insensitive NTFS filesystem. Nikolay explained that moving the tmp directory to a case-sensitive filesystem would resolve the errors encountered when generating files.
Pfaffman suggested creating a Docker volume for /tmp to redirect it to the desired location on the host filesystem. Alternatively, Pfaffman recommended moving all of Discourse to a non-case-insensitive filesystem or adding a volume for just /tmp to address the issue.
What problem are you trying to solve?
One solution might be do create a docker volume for /tmp that points to wherever you want on the host file system.
the problem is because i mounted discourse from host to docker, so folder /var/discourse in shared directory between host (which is on windows) and client os (which is on linux). And because of that, there are some problems.
One of the problem i described today: Problem with development on Windows with Docker and mounted volume
when discourse try to generate some files in “tmp” directory it gets errors, because it expect filesystem to be case sensitive, but mounted directory uses windows ntfs filesystem, that is case insensitive.
If i can somehow change location of tmp dir, so it will be in /tmp, then problem will go away, because guest os filesystem is ext4 which support case sensitive directories
I’d just move all of Discourse to a non-stupid file system (Actually, I quit using Windows around Win98). Failing that, you can add a volume for just /tmp.