basecamp / thruster

MIT License
672 stars 16 forks source link

Kamal guide #9

Open 34code opened 3 months ago

34code commented 3 months ago

Thanks for building this!

I could definitely use SSL support.. Just wanted to understand how to use with kamal for deployment? I'm trying to simply copy a ubuntu generated thrust into my dockerfile via ./bin/rails directory.

Doesn't seem to work.

kevinmcconnell commented 3 months ago

Hi @34code, unfortunately this isn't straightforward right now, because applications deployed with Kamal are served through another proxy (using Traefik). That proxy terminates the connection, and forwards plain HTTP traffic into the container where Thruster is running. In that configuration, Thruster doesn't have a way to handle the HTTPS traffic.

We're working on some ways to make this simpler on the Kamal side.

But in the meantime, one option would be to have Traefik handle the SSL termination. There's a discussion here that might have what you need to do that.

You can still run Thruster in that setup if its other features are useful to you (like the caching, X-Sendfile, etc).

34code commented 3 months ago

Thanks for pointing me to that discussion!

strzibny commented 2 months ago

I just deployed Thruster with Kamal. Simply keep SSL with Traefik like https://nts.strzibny.name/deploying-rails-single-server-kamal/ and use Thruster for assets (no config there). That's the best/cleanest way right now.

34code commented 2 months ago

https://nts.strzibny.name/running-thruster-rails-kamal/

I used this one above ^^ and the previous guidance to do SSL with letsencrypt and traefik

34code commented 1 month ago

Would be cool if thruster supported ssl with letsencrypt directly someday.. as that would be one less network hop from traefik to thruster..

Can live with current setup until then 😀

34code commented 1 month ago

Turns out it does (thruster ssl support) and I just didn't read about it.. wonder how it plays with default kamal which has zero downtime deploys with traefik

strzibny commented 1 month ago

Yes, it does support that, but it's designed for standalone use (like in ONCE products) not with Kamal in mind. I believe this will be somehow solved in Kamal 2 with a new proxy or update to Thruster.