Tinsmith6176 seeks help setting up Discourse behind Caddy as a reverse proxy on an Oracle Free Tier Ubuntu server using Docker. Initially unsure how to configure Discourse without its built-in web server, they reference a meta.discourse.org thread suggested by itsbhanusharma. After experimenting with Caddyfile configurations involving Unix sockets, Tinsmith6176 realizes they must mount the Discourse socket volume into the Caddy container — a point clarified by itsbhanusharma. They later consider switching Discourse to the default Docker bridge network to simplify proxying via container name and port, but eventually return to the socket method. With guidance from another thread on Nginx Proxy Manager shared by itsbhanusharma, Tinsmith6176 successfully configures Caddy using reverse_proxy unix//sock/nginx.http.sock and mounts /var/discourse/shared/standalone:/sock in their docker-compose.yml. They note their Caddyfile syntax differs slightly from the original guide, which itsbhanusharma attributes to upstream Caddy changes. The solution works, and Tinsmith6176 thanks itsbhanusharma for the help.
If i’m not posting this in the right section, i’m sorry.
I’m using Oracle Free tier as my server, and i have a Ubuntu installation with a couple of docker containers running.
I’m using Caddy, also running in docker, as rproxy for all my containers.
Now i need to setup Discourse as the last piece of the puzzle, but i’m not sure how to proceed.
I have testet and installed Discourse with a standard docker installation on my other testserver, but that’s the whole package, and if i need to use caddy as rproxy, i need to disable some of the features i guess?
If anyone could point me in the right direction, i would much appriceate it.
This line from the original topic needs to be adjusted for your directory for this to work. Unless the correct directory is mounted in caddy container, it can not see the socket created by discourse.
Arh, you mean that i need to mount the discourse sock to caddy? that makes sense!
I tried something else last night however.
When discourse is started, it is running in a docker bridge network. If i just add the docker-default network that all my other containers, including Caddy, is in, then i can simply add it to caddy like i do with all my other containers.
I couldn’t figure out where the docker network is defined in all those yml files though. If i could change it from the bridge to run in docker default, all is fixed for me.