I am trying to install Discourse, I configured my db, redis, and smtp. For the Postgresql DB it had no problem with the unix socket, but for redis it seems to be complaining.
redis settings:
sudo sed -i 's/^# unixsocket /unixsocket /' /etc/redis/redis.conf
sudo sed -i 's/^# unixsocketp.*/unixsocketperm 770/' /etc/redis/redis.conf
sudo sed -i 's/^# maxmemory <bytes>/maxmemory 1024mb/' /etc/redis/redis.conf
sudo sed -i 's/^# maxmemory-policy noeviction/maxmemory-policy allkeys-lru/' /etc/redis/redis.conf
sudo cat /etc/redis/redis.conf | grep "^maxmemory\|^unixsocket"
If you want to install Discourse for production you should use the Discourse official Standard Installation. If you want to install a development environment, there are topics for each os.
Just to clarify, I am completely up and running and everything working, but I had to set redis host to “localhost” because connecting to redis via unix socket would not work.
I followed this guide: Install Discourse Forum on Ubuntu 18.04 Without Docker
because the guide is somewhat dated I did have to make a couple adjustments here and there, but I am very familiar with Linux so I was able to work through it just fine.
My install is on a Proxmox LXC container running Ubuntu 20.04
I think that it’ll be rather difficult to install or maintain a production instance that does not use Docker. There are a number of tricky bits with the interaction between nginx and Discourse that will be complicated to maintain withtout the docker container that they provide, but anything’s possible, I suppose.
That’s not likely to change. If the current template doesn’t support using a socket than that means CDCK doesn’t use a redis socket in their hosting or their supported docker installation.
I’m not sure what problem you’re solving by not using the supported ./launcher & docker configuration, but you’re likely going to find a bunch of other issues as well.
I am not sure if you have ever used Proxmox, but in my opinion it is Fantastic! I can log into the web interface and with a single click create a backup, I can then make changes and if something goes wrong I just select the backup and click restore.
Then on top of that you get much better performance from an LXC container than you will from a docker image, there is no comparison.
I am not saying docker is bad because as you have pointed out it makes it VERY easy to get setup.
I bet for the things you’ve used it for it’s been great!
I’m pretty sure that people have made that comparison and that 100-1000X as many images are running on Docker than on LXC (which I did use, once upon a time).
I’m not saying that Proxmox is bad, but if you want Discourse to be easy to set up and maintain, you’ll use Docker. For a frame of reference, if you were to ask for help on marketplace with a budget of under $1,000 I wouldn’t respond.
The point of the thread was to ask about the current status of Redis Unix Socket. Not to debate if LXC or docker is better suited for Discourse. I only mentioned why I was not using Docker because you seemed like you might be curious about it. For the average person docker will win every time, because its simple. That is also the reason that for the longest time so many applications used mysql instead of postgresql. But I absolutely love postgresql.
Until I run into some kind of devastating problems I will definitely be sticking with LXC, it just performs great! Also I couldn’t agree more that if you think you might need external support that you should probably stick with whatever the recommended defaults are. I myself have 20 different services all in their own LXC containers, running in a single Proxmox node, and they are all running great, and that is just a single Node in a Proxmox Cluster. Automated backups, Monitoring, Migration between Nodes in the cluster, these are all great things
Did I mention that my install went smoothly? So far I love Discourse, other than having to use localhost for redis instead of unix socket I had zero issues, will try and remember to post back in a few months to let you know if that is still the case
Ha! NO! Awesome! Glad you got it worked out! It sounds like if you’re willing to live with localhost for redis you’ll be trouble free going forward.
I guess it’s usermod -aG redis discourse or alternatively unixsocketperm 777 so that unicorn has permissions to access the socket. Also assure that the directory where the socket is to be created exists and has redis user as owner. However, the common systemd-service based redis-server package on Ubuntu assures that.