- Python 66.4%
- HTML 23.2%
- CSS 7.4%
- JavaScript 2.2%
- Dockerfile 0.8%
Replace the three config files read at import time (`config.yml`, `client_secrets.json`, `fas-admin-details.json`) with environment variables. This was the single biggest barrier to running the app in containers — Django settings would crash on import if these files did not exist on disk. Settings changes (`base.py`): - Remove `yaml` import and `config.yml` reading entirely - `ADMINS` set to empty list (Django admin email notifications unused) - OIDC endpoints configurable via env vars (defaulting to Fedora staging at `iddev.fedorainfracloud.org`) - `OIDC_RP_IDP_SIGN_KEY` moved to env var (was hardcoded RSA key) - New `OIDC_SUPERUSER_USERNAMES` setting (comma-separated env var) replaces the `config.yml` `auth.admins` list - `REDIS_HOST` and `REDIS_PORT` configurable via env vars - Consistent multi-line formatting for all `os.environ.get` calls that include default values Settings changes (`dev.py`): - Remove `client_secrets.json` and `fas-admin-details.json` file reads (`base.py` already reads OIDC and FAS credentials from env vars) - Database connection configurable via `DB_HOST`, `DB_NAME`, `DB_USERNAME`, `DB_PASSWORD` env vars (defaults match `podman-compose.yml`) - Remove commented-out Gmail SMTP config - Remove `import json` (no longer needed) Auth changes (`auth.py`): - Remove `yaml` import and `config.yml` reading - Use `settings.OIDC_SUPERUSER_USERNAMES` instead of `cfg['auth']['admins']` - `provider_logout` reads `OIDC_OP_LOGOUT_URL` from env - Modernize `super(`) calls and bare `except` clause Container changes: - `Containerfile`: Install `poetry-plugin-export` (required in Poetry 2.x) and use `poetry export` to generate `requirements.txt` for `pip install` - Commit `poetry.lock` for reproducible builds Also: - Remove `pyyaml` from `pyproject.toml` (no longer needed) - Delete `generate_client_secrets.sh` and `config.yml.example` - Add `.env` to `.gitignore` - Expand `.env.example` with all new env vars Assisted-by: Claude Opus 4.6 (1M context) Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org> |
||
|---|---|---|
| .forgejo | ||
| assets | ||
| docs | ||
| happinesspacket_schema_package | ||
| happinesspackets | ||
| openshift | ||
| templates | ||
| .containerignore | ||
| .coveragerc | ||
| .env.example | ||
| .gitignore | ||
| AGENTS.md | ||
| config.toml | ||
| Containerfile | ||
| fas-admin-details.json.example | ||
| LICENSE | ||
| manage.py | ||
| podman-compose.yml | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
fedora-happiness-packets
Fedora Account System authentication support and fedora-messaging integration to Happiness Packets (demo)
Documentation
For more help, read the project documentation:
fedora-happiness-packets.readthedocs.io
Contributing guidelines
See our contributing guidelines for project guidelines.
Create development environment
These instructions run an instance of fedora-happiness-packets on your local machine for development and testing purposes. See setup instructions in our documentation.
Where to find us
Get in touch with us! You can find us in these places.
»»» New contributor? Start here! «««
Are you looking for ways to contribute? We recommend this path of activities for newcomers to follow:
1. Read project goals and contributing guidelines
Get to know our project better and what our goals are. Our contributing guidelines explains what fedora-happiness-packets is and what it is not. They also explain etiquette on how to work on tickets and send pull requests. It is the most important reference when making contributions to the project.
2. Create a development environment
See fedora-happiness-packets#100.
3. Try out fedora-messaging
fedora-messaging is tool for applications in Fedora Infrastructure to emit messages and communicate with other applications. It is an important part of integration for our project. See fedora-happiness-packets#103 for more info.
4. Look for beginner-friendly tickets
When you complete the previous steps, look for unassigned beginner-friendly tickets. Tickets without an assignee are open for taking. Refer to the contributing guidelines for etiquette on claiming a ticket.
Legal
This project is licensed under the Apache License.