Hello, everyone. I have fresh installment of Discourse in Docker.
So the problem is that after container rebuild, container is up and I can access app page. However, I get 502 as response. In logs or when I try accessing i.e.
rails c (inside container) all I can see is this error:
`permission_error’: bootsnap doesn’t have permission to write cache entries in ‘tmp/cache/bootsnap/compile-cache’ (or, less likely, doesn’t have permission to read ‘/usr/local/lib/ruby/2.7.0/set.rb’) (Bootsnap::CompileCache::PermissionError)
In order to fix this I have to chown -R discourse:discourse /var/www/discourse/tmp (to be exact, it’s /var/www/discourse/tmp/cache/bootsnap) directory inside container, and right after app works fine even without restart. It’s quite obnoxious thing to do manually after each rebuild.
I was thinking that I can tackle it using custom commands section in app.yml with mentione above
chown -R discourse:discourse /var/www/discourse/tmp, but unfortunately it doesn’t work. Commands seem to be called there (tried mkdir just to check), but file permissions are not affected.
What can be the issue here and how it can be resolved? Maybe there is some way to correctly change file permissions?