Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
Nov 20, 2024
Merged

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

merged 12 commits into from
Nov 20, 2024

Conversation

skyl
Copy link
Owner

@skyl skyl commented Nov 20, 2024

PR Type

enhancement, configuration changes


Description

  • Updated service names in docker-compose.yaml to use a corpora_ prefix for better namespace management.
  • Changed URLs in configuration files and scripts to use corpora_app and corpora_redis for consistency.
  • Removed outdated documentation related to Docker Compose and Celery setup.
  • Updated test configurations to reflect new service names and URLs.
  • Added formatting changes to JSON configuration files by adding newlines.

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

    Copy link

    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.

    Copy link

    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]

    -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

    .devcontainer/devcontainer.json Outdated Show resolved Hide resolved
    @skyl skyl merged commit b30aa38 into main Nov 20, 2024
    2 checks passed
    @skyl skyl deleted the enterprise-dev branch November 22, 2024 20:12
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant