Feat-[Docker]: Print sign-in codes and email links on the local API console
Merged
ND
15d ago+25+25+01234567890123456789-0-0-0123456789
Part of ever-co/ever-gauzy#11568
docker compose up api runs the production gauzy-api image, which prints no sign-in code. This sets PRINT_EMAIL_CODES for that service, so the API console shows sign-in codes and e-mail links and contributors can sign in without a mail server. The API honours it only with NODE_ENV=development and both base URLs on localhost, which are this file's defaults. PRINT_EMAIL_CODES=false turns it off.
It needs ever-co/ever-gauzy#11569 in the gauzy-api image. Until then the image ignores the variable.
A new case in self-hosting-docs.test.ts pins this default.
Summary by cubic
Prints sign-in codes and e-mail links on the API console when running docker compose up api, so contributors can sign in without a mail server.
- Adds
PRINT_EMAIL_CODES, on by default; set it tofalseto turn it off. The API honors it only with the development NODE_ENV and localhost base URLs that are this file's defaults. - Requires ever-co/ever-gauzy#11569 in the gauzy-api image; until then the image ignores the variable.
- Adds an architecture test that pins the env default plus the NODE_ENV and base-URL defaults the API needs.
Summary by CodeRabbit
- New Features
- During local development, sign-in codes and email links are printed to the API console when both the API and client base URLs use
localhost. This behavior is enabled by default and can be disabled by settingPRINT_EMAIL_CODES=false. It does not apply when running outside the specified local development setup.
- During local development, sign-in codes and email links are printed to the API console when both the API and client base URLs use