skyl / corpora

Corpora is a self-building corpus that can help build other arbitrary corpora
GNU Affero General Public License v3.0
2 stars 0 forks source link

feat(docker-compose): namespace corpora services #59

Closed skyl closed 2 days ago

skyl commented 2 days ago

PR Type

enhancement, configuration changes


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
2 files
auth.py
Update base URL for authentication service                             

py/packages/corpora_cli/auth.py - Updated `base_url` to use `corpora_app` instead of `app`.
+1/-1     
main.py
Modify API client host URL                                                             

py/packages/corpora_cli/main.py - Changed `client_config.host` default URL to use `corpora_app`.
+1/-1     
Tests
1 files
test_config.py
Update test configurations with new service name                 

py/packages/corpora_cli/test_config.py - Updated test configurations to use `corpora_app` in URLs.
+5/-5     
Configuration changes
6 files
settings.py
Update settings for allowed hosts and Celery configuration

py/packages/corpora_proj/settings.py
  • Changed allowed hosts to include corpora_app.
  • Updated Celery broker and result backend URLs to use corpora_redis.
  • +4/-4     
    genall.sh
    Update OpenAPI generator script URL                                           

    py/genall.sh - Modified OpenAPI spec URL to use `corpora_app`.
    +1/-1     
    genall.sh
    Update OpenAPI spec URL in script                                               

    rs/genall.sh - Changed OpenAPI spec URL to use `corpora_app`.
    +1/-1     
    .corpora.yaml
    Update base URL in configuration file                                       

    .corpora.yaml - Updated `base_url` to use `corpora_app`.
    +1/-1     
    docker-compose.yaml
    Namespace Docker Compose services and update Redis URL     

    docker-compose.yaml
  • Renamed services to use corpora_ prefix.
  • Updated Redis URL to use corpora_redis.
  • +11/-11 
    openapitools.json
    Remove OpenAPI tools configuration                                             

    openapitools.json - Removed the OpenAPI tools configuration file.
    +0/-7     
    Documentation
    1 files
    docker-compose-celery.md
    Remove outdated Docker Compose and Celery documentation   

    md/notes/docker-compose-celery.md - Removed documentation on Docker Compose and Celery setup.
    +0/-176 
    Formatting
    2 files
    openapitools.json
    Format JSON configuration file                                                     

    py/openapitools.json - Added newline at the end of the file.
    +1/-1     
    openapitools.json
    Format JSON configuration file                                                     

    rs/openapitools.json - Added newline at the end of the file.
    +1/-1     

    ๐Ÿ’ก PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    github-actions[bot] commented 2 days ago

    PR Reviewer Guide ๐Ÿ”

    Here are some key observations to aid the review process:

    โฑ๏ธ Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
    ๐Ÿงช PR contains tests
    ๐Ÿ”’ No security concerns identified
    โšก Recommended focus areas for review

    Code Smell
    The hardcoded default base URL in the `AuthResolver` class could lead to issues if the service name changes again. Consider using a configuration file or environment variable to manage default values. Security Concern
    The `DEBUG` setting is set to `True`. Ensure this is turned off in production to prevent sensitive information from being exposed.
    github-actions[bot] commented 2 days ago

    PR Code Suggestions โœจ

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Security
    Set the DEBUG setting to False for production environments to enhance security ___ **Ensure that the DEBUG setting is set to False in production environments to prevent
    the exposure of sensitive information.** [py/packages/corpora_proj/settings.py [25]](https://github.com/skyl/corpora/pull/59/files#diff-bb6dcc14e8988871411f9b97731b6de4cc309ba557ae8a664a5e0ff5b64c564cR25-R25) ```diff -DEBUG = True +DEBUG = False ```
    Suggestion importance[1-10]: 8 Why: The suggestion addresses a critical security concern by recommending that the `DEBUG` setting be set to `False` in production environments. This change helps prevent the exposure of sensitive information, which is crucial for maintaining application security.
    8