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

build: update docker compose deploy #27

Merged
merged 3 commits into from
Dec 24, 2024
Merged

Conversation

Tohrusky
Copy link
Member

@Tohrusky Tohrusky commented Dec 24, 2024

Summary by Sourcery

Update Docker Compose configuration to mount volumes from the project directory for configuration and downloads, simplifying the setup process.

Build:

  • Mount configuration files from ./animepipeline instead of ../conf.
  • Mount downloads from ./downloads instead of ./docker/downloads.
  • Mount qBittorrent configuration from ./allinone/qb-config instead of ./docker/qb-config.
  • Update qBittorrent download path to /downloads.

Tests:

  • Update test case for Telegram bot with a more descriptive name and a fake torrent hash.

Copy link

sourcery-ai bot commented Dec 24, 2024

Reviewer's Guide by Sourcery

This pull request updates the docker compose deployment configuration. The main changes include updating volume mounts to use local directories instead of relative paths and changing the qbittorrent download path. Also a test case for telegram bot is updated.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated volume mounts for the animepipeline service to use local directories.
  • Changed volume mount for configuration files from "../conf" to "./animepipeline".
  • Changed volume mount for downloads from "./docker/downloads" to "./downloads".
deploy/docker-compose.yml
Updated volume mounts and download path for the qbittorrent service.
  • Changed volume mount for configuration files from "./docker/qb-config" to "./allinone/qb-config".
  • Changed volume mount for downloads from "./docker/downloads" to "./downloads".
  • Updated the "download_path" in "server.yml" from "." to "/downloads".
deploy/docker-compose.yml
conf/server.yml
Modified the test case for the telegram bot.
  • Removed unused variables "video_key".
  • Updated the message text in the test function.
  • Changed the torrent file hash in the test function from a real hash to a fake one "this_is_a_fake_hash".
tests/test_tg.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Tohrusky - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Consider using environment variables for qBittorrent credentials instead of hardcoding them in the configuration file (link)
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🔴 Security: 1 blocking issue
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 7 to 8
username: admin
password: adminadmin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 suggestion (security): Consider using environment variables for qBittorrent credentials instead of hardcoding them in the configuration file

Hardcoded credentials pose a security risk and make it difficult to maintain different credentials across environments. Using environment variables would be more secure and flexible.

Suggested implementation:

  username: ${QBITTORRENT_USERNAME:-admin}
  password: ${QBITTORRENT_PASSWORD:-adminadmin}

The developer will need to:

  1. Document the new environment variables in the project's README or documentation
  2. Update any deployment configurations or scripts to set these environment variables
  3. Consider adding these variables to any example .env files (with dummy values)
  4. Update CI/CD pipelines to provide these environment variables during testing

@Tohrusky Tohrusky merged commit 2fb1f7c into TensoRaws:main Dec 24, 2024
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant