planetary-social / ansible-scripts

Ansible automation scripts used at Planetary
MIT License
2 stars 3 forks source link

New playbook for Nostr relay #61

Closed dcadenas closed 7 months ago

dcadenas commented 7 months ago

This relay uses Traefik with ssl and redirects the homepage to webflow. Websocket connections and those that request an application/nostr+json are handled by strfry.

At first I tried both plan nginx, with and without docker, then openresty, then traefik. Traefik seems to be the one more future proof and that will also serve as an example for future projects (nos.social with nip 05) or roles. I couldn't make the Traefik dashboard work with ssl, only the insecure version on port 8080 so I removed it.

A simpler setup (no ssl) just useful for local testing can be found in https://github.com/planetary-social/localstrfry

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.

cooldracula commented 7 months ago

This is looking good, @dcadenas ! I left some feedback that is mostly to make this role easier to maintain in the future. The combo of nginx-redirect and traefik works well, and the deployment is straightforward. I think it is okay to not have the traefik dashboard, as it seems mostly useful when you are managing a bunch of containers and routes. It doesn't offer much for our setup that counteracts the added complexity of managing athentication and such for that dashboard.

With just a few changes, I think this would be good to merge!