Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Conversation

@Atmois
Copy link
Contributor

@Atmois Atmois commented Aug 30, 2025

  • Renamed docker-compose.yml to compose.yaml
  • Renamed Dockerfile to Containerfile
  • Ran a linter through the compose to fix formatting
  • Changed irc to use intenral docker networking for json-rpc api
  • Simplified the docker network to just use container names
  • Updated CI/README with all the changes

Summary by Sourcery

Rename Docker build and compose files to Containerfile and compose.yml, modernize linting workflows, reformat compose configuration, and simplify Docker networking

New Features:

  • Serve JSON-RPC API over internal Docker network instead of host port mapping

Enhancements:

  • Rename Dockerfile to Containerfile and docker-compose.yml to compose.yml across the repository
  • Reformat compose.yml using linter rules
  • Simplify Docker network configuration to default bridge driver with container names

CI:

  • Update GitHub Actions workflows to use containerfile-lint and compose-lint jobs with updated detection patterns
  • Update test-ci.sh to invoke containerfile-lint and compose-lint

Documentation:

  • Update CI/README and web/webpanel/README to reference Containerfile and compose.yml

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 30, 2025

Reviewer's Guide

This PR standardizes container build artifacts by renaming Dockerfiles to Containerfiles and docker-compose manifests to compose files, updates CI workflows and linting targets accordingly, applies formatting fixes via linters, simplifies the networking configuration in compose, and updates related documentation.

Class diagram for CI workflow job renaming and logic changes

classDiagram
    class CIWorkflow {
      +containerfile-lint
      +compose-lint
      +security-scan
    }
    CIWorkflow : -dockerfile-lint
    CIWorkflow : -docker-compose-lint
    CIWorkflow : +containerfile-lint
    CIWorkflow : +compose-lint
    CIWorkflow : updated file detection logic
    CIWorkflow : updated build and lint targets
    CIWorkflow : updated output messages
    CIWorkflow : updated security scan to use Containerfile
    CIWorkflow : updated compose file validation
Loading

File-Level Changes

Change Details Files
Rename Dockerfile to Containerfile and update all references
  • Rename build configuration files across services to Containerfile
  • Update CI lint jobs and detection patterns in ci.yml
  • Adjust hadolint targets in Makefile to use Containerfile
  • Modify test-ci.sh commands and job names to containerfile-lint
.github/workflows/ci.yml
Makefile
scripts/test-ci.sh
web/webpanel/Containerfile
compose.yml
Rename docker-compose.yml to compose.yml and adjust CI detection
  • Rename manifest file to compose.yml
  • Update file patterns and job names for compose linting in ci.yml
  • Modify test-ci.sh to invoke compose-lint instead of docker-compose-lint
.github/workflows/ci.yml
compose.yml
scripts/test-ci.sh
Apply linter-driven formatting fixes and adjust YAML linting
  • Reformat compose.yml for consistent indentation and style
  • Update yamllint config and whitespace adjustments in ci.yml
  • Run linter across compose definitions
compose.yml
.github/workflows/ci.yml
Simplify networking and switch JSON-RPC API to internal mode
  • Remove explicit JSON-RPC port mapping in compose.yml
  • Simplify network declaration to use container names only
  • Eliminate custom IPAM/subnet configuration
compose.yml
Update documentation to reflect renames
  • Change Dockerfile references to Containerfile in web panel README
  • Clarify build configuration naming in documentation
web/webpanel/README.md

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. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

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

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

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 there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/workflows/ci.yml:118` </location>
<code_context>
         uses: hadolint/[email protected]
         with:
-          dockerfile: './Dockerfile'
+          dockerfile: './Containerfile'
           failure-threshold: warning
           format: sarif
</code_context>

<issue_to_address>
Linting is now hardcoded to './Containerfile', which may miss Containerfiles in subdirectories.

This will result in only the root Containerfile being linted. To ensure all Containerfiles are checked, iterate over all relevant files.

Suggested implementation:

```
      - name: Find all Containerfiles
        id: find_containerfiles
        run: |
          find . -type f \( -name 'Containerfile' -o -name 'Dockerfile' \) > containerfile_list.txt

      - name: Lint all Containerfiles with Hadolint (Security Report)
        if: steps.containerfiles.outputs.found == 'true'
        run: |
          while IFS= read -r file; do
            hadolint "$file" --format sarif >> hadolint-results.sarif || true
          done < containerfile_list.txt

```

- Ensure that Hadolint is available in the runner environment (install if needed).
- If you want to keep using the Hadolint GitHub Action, you may need to use a matrix strategy or a custom script instead, as the action does not natively support multiple files.
- The aggregation of SARIF results may require post-processing if you want a single SARIF file for upload.
- Adjust the `Upload Hadolint results to GitHub Security` step to use the correct output file path if changed.
</issue_to_address>

### Comment 2
<location> `.github/workflows/ci.yml:189` </location>
<code_context>
-          # Find all docker-compose files in the repository
-          compose_files=$(find . -name "docker-compose*.yml" -o -name "docker-compose*.yaml" -o -name "compose*.yml" -o -name "compose*.yaml" | grep -v ".git")
+          # Find all compose files in the repository
+          compose_files=$(find . -name "compose*.yml" -o -name "compose*.yaml" -o -name "compose*.yml" -o -name "compose*.yaml" | grep -v ".git")
           if [ -n "$compose_files" ]; then
             echo "found=true" >> $GITHUB_OUTPUT
</code_context>

<issue_to_address>
Duplicate file patterns in compose file discovery.

The file patterns '-name "compose*.yml"' and '-name "compose*.yaml"' are listed twice in the find command. Removing the duplicates will make the code clearer.
</issue_to_address>

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.

Copy link
Collaborator

@amadaluzia amadaluzia left a comment

Choose a reason for hiding this comment

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

LGTM, ready to merge?

Previous tests were reported as 100% successful aside from one skipped test. I think this can be merged, I just want to double check that all tests pass... and it did.

@amadaluzia amadaluzia force-pushed the compose-improvments branch from 0c1dc79 to 0da191c Compare August 30, 2025 14:59
@Atmois
Copy link
Contributor Author

Atmois commented Aug 30, 2025

LGTM

@amadaluzia amadaluzia merged commit 58c1ede into main Aug 30, 2025
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants