[user-management] build / refactor : move build / development flow to docker , upgrade infrastrucure#43
Merged
metalalive merged 15 commits intomasterfrom Aug 17, 2025
Conversation
… infra - set up environment for running test cases with dockerfile - use `docker compose` to launch series of other infra services like mariaDB database - move dependncy config from `pyproject.toml` to `Pipfile`, note `pyproject.toml` is still required for pipenv installing local package - modify database initialization flow, set up databases / relevant login users in docker entry script. - upgrade python to v3.13 , mariaDB server to v11.8.2 docker container, pipenv to 2025.0.4 - misc , update gitignore Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…ocker - streamline initialization flow for development environment in docker compose, such as database shcema / data migration, run django development server, all tasks are moved in to container TODO: - set up RPC consumer (celery) and backend message queue (RabbitMQ) in docker - smoke test, verify few critical paths from API, only in development environment Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- set up custom initialization flow for backend message queue (RabbitMQ) in docker compose - define docker network for message queue server interacting with other applications Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- fix errors in docker compose file for test - exclude commonly used data files that can be switched between different environments. Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…er build flow - seperate CORS config file for different environments - remove needless fields in secret template file - remove class-level private property in extended logger - fix model name lookup in Django ContentType, the search key should be all lowercase characters Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…ment - the test demonstrates basic operations through API server e.g. roles, quota, group , user profiles, login process , auth tokens ... etc. - the test here does NOT consider network domain name / secure connection issue , currently no need to share the development environment across internet Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 20073992 | Triggered | Generic Password | 2f7fac8 | services/user_management/tests/smoke_test.py | View secret |
| 19482687 | Triggered | Generic Password | 370b405 | services/user_management/infra/sample.env | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
…code - reduce final image size by applying multi-stage builds to backend base docker file. - discard installed packages e.g. python3-dev, gcc, venv, unused at runtime - add missing quota / low-level permission fixture to data migration as part of deployment - set up volume to map setting modules and misc. files only for test outside docker image instead of copying them, this adds flexibility to run app in different environments. - correct reference paths to fixture / template file in code - resolve `FutureWarning` due to future breaking change of `functools.partial` , see issue 121027 in cpython github repo - ensure / enforce lowercase keywords for Django ContentType search Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- set up common async job worker - resolve `FutureWarning` due to future breaking change of `functools.partial` , see issue 121027 in cpython github repo - replace old python setup with docker commands in user-management Github Action workflow, make the build / test process consistent. - fix error in CORS configuration data Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…able interpolation - fix lint errors, add account activation case in smoke test - misc, remove needless response status code in API view Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
…erfile - remove previous build flow description in README Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.