Skip to content

Conversation

piprett
Copy link
Contributor

@piprett piprett commented Nov 3, 2024

Moved .env files to .env.example files. Checked them out of git, .env is already in the root .gitignore. It's annoying to work with .env files checked in, they make it a lot easier to leak credentials, and harder to pull upstream.

piprett added a commit to Erb3/modrinth that referenced this pull request Nov 3, 2024
This will help setting up labrinth for local development. You can now use a mock SMTP server such as smtp4dev. The TLS options will stay the same as before if set to `true`, and disabled when `false`.

Depends on modrinth#2883
@piprett
Copy link
Contributor Author

piprett commented Nov 23, 2024

This is just sitting here making conflicts. Prioritizing #2886 for the time being. Please re-open when you (staff) are interested in reviewing/merging

@piprett piprett marked this pull request as draft November 23, 2024 19:11
github-merge-queue bot pushed a commit that referenced this pull request Apr 22, 2025
* refactor: move .env to .env.example

* refactor(labrinth): allow setting SMTP port and TLS

This will help setting up labrinth for local development. You can now use a mock SMTP server such as smtp4dev. The TLS options will stay the same as before if set to `true`, and disabled when `false`.

Depends on #2883

* chore(labrinth): lint

* chore(labrinth): conflicts

* chore(labrinth): conflicts

* fix: use TLS port by default

Co-authored-by: AlexTMjugador<me@alegon.dev>

Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Signed-off-by: Erb3 <49862976+Erb3@users.noreply.github.com>

* fix(labrinth): correct deafult SMTP port in .env

* feat(labrinth): expose all SMTP TLS settings

Replaced if/else with a switch statement. The new values for `SMPT_TLS` are `none`, `opportunistic_start_tls`, `requires_start_tls`, `tls`. When none of these values are supplied, it defaults to full TLS (`tls`), and throws a warning.

Resolves PR review

* fix(labrinth): correct SMTP TLS example .env setting

Signed-off-by: Erb3 <49862976+Erb3@users.noreply.github.com>

* fix(labrinth) SMTP tls env var check

Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Signed-off-by: Erb3 <49862976+Erb3@users.noreply.github.com>

---------

Signed-off-by: Erb3 <49862976+Erb3@users.noreply.github.com>
Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
@AlexTMjugador AlexTMjugador added the DevEx Improvements to developer experience label May 2, 2025
@AlexTMjugador AlexTMjugador marked this pull request as ready for review May 2, 2025 12:53
@AlexTMjugador
Copy link
Member

Hi @Erb3, I think this PR is also pretty helpful, thanks for putting it together! Would you mind updating it so it's ready to merge? Much appreciated! ❤️

@piprett
Copy link
Contributor Author

piprett commented May 2, 2025

Superseded by #3592

@piprett piprett closed this May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DevEx Improvements to developer experience

Development

Successfully merging this pull request may close these issues.

2 participants