discuitnet / discuit

A free and open-source community discussion platform.
https://discuit.net
GNU Affero General Public License v3.0
411 stars 52 forks source link

Docker support config via env vars #49

Closed Codycody31 closed 3 months ago

Codycody31 commented 6 months ago

Changes

Purpose

This PR now adds support for using environment variables making it way easier to run discuit via docker.

Related Issues

Requests When Reviewing

I didn't know how the cmd in main.go should be so it is called inject-config but it's most definitely free to be changed to a better name, as the current one was just a test/general and the purpose has changed.

Codycody31 commented 3 months ago

Everything works now, the only thing that could probably be added would be a way to auto-generate the environment variables based on the struct rather than manually defining them, example here. However, it could always be added in a future PR.

previnder commented 3 months ago

We could indeed use reflection for that, but I'm going to merge this one right now. But yeah that could be a future PR.