Skip to content

Comments

feat: Add Docker build and publish CI for web app#432

Merged
elie222 merged 17 commits intoelie222:mainfrom
gowthamkishore3799:main
May 12, 2025
Merged

feat: Add Docker build and publish CI for web app#432
elie222 merged 17 commits intoelie222:mainfrom
gowthamkishore3799:main

Conversation

@gowthamkishore3799
Copy link
Contributor

@gowthamkishore3799 gowthamkishore3799 commented May 12, 2025

This PR adds Docker support for the apps/web application and a GitHub Actions workflow to automatically build and publish images to GHCR.

Changes:

.github/workflows/build_and_publish_docker.yml: New GitHub Action workflow that:
Triggers on push to main branch.
Builds the image using Dockerfile.prod.
Pushes the tagged image to GHCR.
Note for Maintainers: Please update the images path in this workflow to ghcr.io/${{ github.repository_owner }}/inbox-zero after merging.
Code Changes (apps/web/...): Modified projectid to project123 for build.
Testing & Local Usage:

CI Workflow: Successfully tested in fork (gowthamkishore3799/inbox-zero). Pushing a version tag built and pushed a working image. You can test this specific image: docker pull ghcr.io/gowthamkishore3799/inbox-zero:v1.0.0
Local Build: You can build the image locally using docker build -t inbox-zero-test -f docker/Dockerfile.prod .
Running Pre-Built Image with Docker Compose:
To run the pre-built images from GHCR (after this PR is merged and images are published to the main repo's registry), modify your local docker-compose.yml file:
Comment out or remove the build: section for the web service (if present).
Ensure your local ./apps/web/.env file contains the necessary runtime environment variables.
Run docker compose up -d.
Addresses the request for an official Docker image raised in #389.

Summary by CodeRabbit
New Features
Introduced automated publishing of Docker images to GitHub Container Registry on version tag pushes.
Added a production-ready Dockerfile for optimized and reproducible builds.
Bug Fixes
Improved blog and sitemap build reliability by skipping Sanity data fetches when dummy credentials are detected.
Added a user-facing message when blog post content is unavailable.
Chores
Updated Docker Compose to use a pre-built image from a remote registry.

Summary by CodeRabbit

  • Chores

    • Introduced automated workflow for building and publishing Docker images, including version management.
    • Added a version file to track application releases.
    • Updated Docker configuration for streamlined builds and environment variable management.
    • Adjusted docker-compose to pull the latest Docker image if not present.
  • Refactor

    • Improved import statement organization for better code readability.
    • Simplified and consolidated environment variable usage in Docker-related files.
  • Bug Fixes

    • Modified environment variable checks to ensure correct behavior when fetching blog posts and generating sitemaps.

@vercel
Copy link

vercel bot commented May 12, 2025

@gowthamkishore3799 is attempting to deploy a commit to the Inbox Zero Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a new GitHub Actions workflow for automated Docker image building, versioning, and publishing to GitHub Container Registry. It also modifies the Docker build process, environment variable handling, and Sanity project ID checks in several files. The docker-compose.yml is updated to pull the latest image if not present, and a version.txt file is added for version tracking.

Changes

File(s) Change Summary
.github/workflows/build_and_publish_docker.yml Added a new GitHub Actions workflow to automate Docker image building, tagging, publishing, and version incrementing using a version.txt file.
docker/Dockerfile.prod Streamlined dependency installation with pnpm install --prefer-offline --ignore-scripts, consolidated environment variables, changed Sanity project ID to "project123", reordered build steps, and removed redundant Prisma generate commands.
apps/web/app/blog/page.tsx
apps/web/app/blog/post/[slug]/page.tsx
apps/web/app/sitemap.ts
Reordered imports and updated the condition for skipping Sanity fetches from a dummy project ID to "project123".
docker-compose.yml Set the web service to use the ghcr.io/elie222/inbox-zero:latest image with pull_policy: if_not_present, changed the Dockerfile path to ./docker/Dockerfile.prod.
version.txt Added a new file containing the version identifier v1.0.0.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GitHub as GitHub Actions
    participant GHCR as GitHub Container Registry
    participant Repo as Repository

    Dev->>GitHub: Push to main branch
    GitHub->>GitHub: set-version job (read version.txt)
    GitHub->>GitHub: build-docker job (build & tag Docker image)
    GitHub->>GHCR: Push Docker image (latest & version tag)
    GitHub->>GitHub: update_version_txt job (increment version.txt, commit & tag)
    GitHub->>Repo: Push updated version.txt and tag
Loading

Possibly related PRs

  • elie222/inbox-zero#432: Adds the same GitHub Actions workflow for Docker image building and version management, directly related to this PR.
  • elie222/inbox-zero#424: Previously managed Docker image publishing workflow which this PR replaces with an enhanced version.
  • elie222/inbox-zero#418: Implements a similar Docker image build and publish workflow targeting the same container registry and production Dockerfile.

Poem

🐇
A Docker image hops anew,
With workflows set and tags in view.
Version bumps with every build,
Sanity checks are now fulfilled.
Compose will pull the freshest byte,
This rabbit’s CI feels just right!
🥕

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2662007 and 7b57859.

📒 Files selected for processing (2)
  • .github/workflows/build_and_publish_docker.yml (1 hunks)
  • docker-compose.yml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@gowthamkishore3799 gowthamkishore3799 changed the title WIP feat: Add Docker build and publish CI for web app Draft feat: Add Docker build and publish CI for web app May 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
version.txt (1)

1-1: Add trailing newline character

The version format looks good, but best practice is to include a trailing newline character at the end of text files for better compatibility with Unix tools and to avoid warnings from some tools.

-v1.0.0
+v1.0.0
+
apps/web/app/blog/page.tsx (1)

1-7: Clean import organization

The imports have been reorganized in a more logical way with type imports first, followed by component imports, and then utility imports. This improves code readability without affecting functionality.

.github/workflows/build_and_publish_docker.yml (1)

4-7: Consider adding tag-based triggers for semantic versioning

The workflow currently only triggers on pushes to the main branch. Consider adding tag-based triggers to enable semantic versioning (e.g., when tags matching v*.. are pushed).

on:
  push:
    branches: [ "main" ]
+   tags:
+     - 'v*.*.*'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 600264b and c1a1490.

📒 Files selected for processing (7)
  • .github/workflows/build_and_publish_docker.yml (1 hunks)
  • apps/web/app/blog/page.tsx (2 hunks)
  • apps/web/app/blog/post/[slug]/page.tsx (1 hunks)
  • apps/web/app/sitemap.ts (1 hunks)
  • docker-compose.yml (1 hunks)
  • docker/Dockerfile.prod (2 hunks)
  • version.txt (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build_and_publish_docker.yml

51-51: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-54: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (9)
apps/web/app/blog/post/[slug]/page.tsx (1)

13-13: Environment check updated correctly

Updating the environment check to use "project123" is consistent with the PR's goal of standardizing the project ID value used during Docker builds. This ensures that Sanity data fetches are properly skipped during build time when not needed.

apps/web/app/sitemap.ts (1)

8-8: Environment check updated correctly

The change to use "project123" for the environment check is consistent with the updates in other files and aligns with the standardized approach for Docker builds. This ensures that Sanity data fetches are properly skipped during build time.

docker/Dockerfile.prod (3)

21-23: Improved dependency installation approach

The addition of --prefer-offline and --ignore-scripts flags to the pnpm install command is a good optimization. The --prefer-offline flag will use cached packages when available, speeding up builds, while --ignore-scripts prevents running potentially unnecessary postinstall scripts at this stage.


28-30: Logical sequence for Prisma generate

Moving the Prisma generate command to immediately follow dependency installation is a good practice. This ensures it runs with all build-time variables and leverages caching effectively.


54-54:

Details

✅ Verification successful

Verify Sanity project ID consistency

The Sanity project ID has been changed to "project123", which aligns with the conditional checks in other files like apps/web/app/blog/page.tsx. This ensures consistent handling of Sanity content fetching during build and runtime.


🏁 Script executed:

#!/bin/bash
# Checking for consistent use of the new Sanity project ID across the codebase
echo "Checking for consistent use of Sanity project ID..."
rg "NEXT_PUBLIC_SANITY_PROJECT_ID.*project123" --type tsx --type ts
rg "dummy-sanity-project-id-for-build" --type tsx --type ts

Length of output: 298


🏁 Script executed:

#!/bin/bash
set -e

echo "🔍 Searching for NEXT_PUBLIC_SANITY_PROJECT_ID references across the repo"
rg "NEXT_PUBLIC_SANITY_PROJECT_ID" || true

echo
echo "🔍 Searching for explicit “project123” usage in code"
rg "project123" || true

echo
echo "🔍 Searching for placeholder “dummy-sanity-project-id-for-build”"
rg "dummy-sanity-project-id-for-build" || true

Length of output: 1500


Sanity project ID updated consistently across the codebase

Verified that NEXT_PUBLIC_SANITY_PROJECT_ID has been set to "project123" in docker/Dockerfile.prod and that all runtime checks now reference this value. No remaining occurrences of the old placeholder (dummy-sanity-project-id-for-build) were found.

Files updated and verified:

  • docker/Dockerfile.prod: ENV NEXT_PUBLIC_SANITY_PROJECT_ID="project123"
  • apps/web/sanity/env.ts & sanity.cli.ts: sourcing process.env.NEXT_PUBLIC_SANITY_PROJECT_ID
  • apps/web/app/sitemap.ts, blog/page.tsx, blog/post/[slug]/page.tsx: conditional logic aligned to "project123"

All checks are in sync—LGTM!

apps/web/app/blog/page.tsx (1)

211-211: Consistent environment check for Sanity project ID

The environment variable check has been updated to match the new value in the Dockerfile ("project123"). This ensures that content is only fetched from Sanity when a real project ID is used, not the dummy one used for building.

.github/workflows/build_and_publish_docker.yml (3)

1-10: Good workflow setup with clear naming and configuration

The workflow is well-structured with descriptive name, trigger conditions, and environment variables for Docker image registry and username. These variables make the workflow more maintainable.


14-30: Well-structured versioning job

The version setting job correctly reads from a version.txt file and makes it available as output for downstream jobs. The condition ensures it only runs in the intended repository.


66-111: Robust version updating mechanism

The version updating job correctly increments the patch version, commits the changes, and pushes them with appropriate tagging. The use of force_with_lease provides a safer alternative to force push.

- inbox-zero-network

web:
image: ghcr.io/elie222/inbox-zero:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Update image repository owner before merging

As mentioned in the PR description, the image path should be updated to use the organization's repository owner.


🏁 Script executed:

#!/bin/bash
# Check the repository owner
echo "Current image path: ghcr.io/elie222/inbox-zero:latest"
echo "Repository owner: $(git remote get-url origin | sed -n 's/.*github.com[:\/]\([^\/]*\)\/.*/\1/p')"

Length of output: 257


🏁 Script executed:

#!/bin/bash
# List all git remotes to identify the organization’s repository owner
git remote -v
if git remote get-url upstream &> /dev/null; then
  echo "Upstream remote URL: $(git remote get-url upstream)"
  echo "Upstream owner: $(git remote get-url upstream | sed -n 's/.*github.com[:\/]\([^\/]*\)\/.*/\1/p')"
else
  echo "No 'upstream' remote configured"
fi

Length of output: 249


Update image repository owner in docker-compose.yml

Please replace the personal namespace with your organization’s GitHub Container Registry owner before merging.

• File: docker-compose.yml
• Line 41

Diff suggestion:

-    image: ghcr.io/elie222/inbox-zero:latest
+    image: ghcr.io/<ORG_OWNER>/inbox-zero:latest

Replace <ORG_OWNER> with your official GitHub organization or team name.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
image: ghcr.io/elie222/inbox-zero:latest
image: ghcr.io/<ORG_OWNER>/inbox-zero:latest

@gowthamkishore3799 gowthamkishore3799 changed the title Draft feat: Add Docker build and publish CI for web app feat: Add Docker build and publish CI for web app May 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/build_and_publish_docker.yml (1)

50-59: 🛠️ Refactor suggestion

Bump Docker actions and enable multi-arch builds
The setup-buildx-action@v2 and build-push-action@v4 versions are outdated, and you’re only targeting linux/arm64. Upgrade to the latest stable releases and expand platforms to linux/amd64,linux/arm64 for broader compatibility.

Proposed diff:

-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v2
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3.10.0

-      - name: Build and Push Docker Image
-        uses: docker/build-push-action@v4
+      - name: Build and Push Docker Image
+        uses: docker/build-push-action@v6.16.0
         with:
           context: .
           file: docker/Dockerfile.prod
-          platforms: linux/arm64
+          platforms: linux/amd64,linux/arm64
🧰 Tools
🪛 actionlint (1.7.4)

51-51: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-54: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🧹 Nitpick comments (2)
.github/workflows/build_and_publish_docker.yml (2)

9-11: Standardize DOCKER_USERNAME for maintainability
Hardcoding elie222 in the env block means that after merging, pushes will still target your fork. Use ${{ github.repository_owner }} so the workflow automatically points to the correct registry owner.

Proposed diff:

 env:
   DOCKER_IMAGE_REGISTRY: "ghcr.io"
-  DOCKER_USERNAME: "elie222"
+  DOCKER_USERNAME: ${{ github.repository_owner }}

22-23: Unify actions/checkout version
You’re using actions/checkout@v4.1.1 in set-version and @v4 in build-docker. Pinning both to the same release reduces drift and unexpected behavior.

Proposed diff:

-        uses: actions/checkout@v4
+        uses: actions/checkout@v4.1.1

Also applies to: 39-40

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1a1490 and 19892d4.

📒 Files selected for processing (1)
  • .github/workflows/build_and_publish_docker.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build_and_publish_docker.yml

51-51: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-54: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
.github/workflows/build_and_publish_docker.yml (2)

51-52: ⚠️ Potential issue

Upgrade Docker Buildx action to v3.x
docker/setup-buildx-action@v2 is deprecated on modern runners and may cause failures. Upgrade to the latest v3.x release (e.g., v3.10.0).

-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v2
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3.10.0
🧰 Tools
🪛 actionlint (1.7.4)

51-51: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-55: ⚠️ Potential issue

Upgrade Docker Build and Push action to v6.x
docker/build-push-action@v4 is outdated and will fail on current GitHub Actions runners. Bump to v6.16.0 (or latest v6).

-      - name: Build and Push Docker Image
-        uses: docker/build-push-action@v4
+      - name: Build and Push Docker Image
+        uses: docker/build-push-action@v6.16.0
🧰 Tools
🪛 actionlint (1.7.4)

54-54: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🧹 Nitpick comments (1)
.github/workflows/build_and_publish_docker.yml (1)

10-10: Make DOCKER_USERNAME dynamic
Hard-coding elie222 can lead to misconfiguration if the repository owner changes. Use ${{ github.repository_owner }} for flexibility and future portability.

-  DOCKER_USERNAME: "elie222"
+  DOCKER_USERNAME: "${{ github.repository_owner }}"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19892d4 and be5c919.

📒 Files selected for processing (2)
  • .github/workflows/build_and_publish_docker.yml (1 hunks)
  • docker-compose.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docker-compose.yml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build_and_publish_docker.yml

51-51: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-54: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Comment on lines 100 to 102
git tag -a "${{ needs.set-version.outputs.version }}" -m "Release version ${{ needs.set-version.outputs.version }}"
git commit -a -m "Update base version to ${{needs.set-version.outputs.version}}"
echo "Version updated to ${{needs.set-version.outputs.version}} on trails" >> $GITHUB_STEP_SUMMARY
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix version bump commit and push branch
The update_version_txt job’s commit message uses the old version and the push action targets ${{ github.ref }} instead of main, which may not map correctly. Update the commit to reference the new bumped version and push explicitly to main.

-          git tag -a "${{ needs.set-version.outputs.version }}" -m "Release version ${{ needs.set-version.outputs.version }}"
-          git commit -a -m "Update base version to ${{needs.set-version.outputs.version}}"
+          git tag -a "${{ needs.set-version.outputs.version }}" -m "Release version ${{ needs.set-version.outputs.version }}"
+          git commit -a -m "Update base version to ${{ steps.update_version.outputs.new_version }}"
@@
-          branch: ${{ github.ref }}
+          branch: main

Also applies to: 108-109

@vercel
Copy link

vercel bot commented May 12, 2025

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@gowthamkishore3799 gowthamkishore3799 changed the title feat: Add Docker build and publish CI for web app Draft feat: Add Docker build and publish CI for web app May 12, 2025
@gowthamkishore3799 gowthamkishore3799 changed the title Draft feat: Add Docker build and publish CI for web app feat: Add Docker build and publish CI for web app May 12, 2025
@gowthamkishore3799
Copy link
Contributor Author

After this deployment is done, ill be adding turbo to fasten the build process

Currently takes time in building during CI/CD, which is expected, turbo would fasten it up, instead of wrapping up everything in single pr, once this is done, ill be making seperate pr for it

@gowthamkishore3799
Copy link
Contributor Author

The previous related to CI/CD from vishal failed due to a const convention, which is fixed here

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (3)
.github/workflows/build_and_publish_docker.yml (3)

58-59: 🛠️ Refactor suggestion

Upgrade docker/build-push-action to the latest major version

v4 is out of date. Use the current v6.x release (e.g., v6.16.0) to ensure full GitHub Actions compatibility and performance improvements:

-      - name: Build and Push Docker Image
-        uses: docker/build-push-action@v4
+      - name: Build and Push Docker Image
+        uses: docker/build-push-action@v6.16.0
🧰 Tools
🪛 actionlint (1.7.4)

58-58: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-56: 🛠️ Refactor suggestion

Upgrade docker/setup-buildx-action to a recent version

v2 is outdated and may no longer run on modern runners. Bump to the latest v3 release (e.g., v3.10.0) for compatibility:

-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v2
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3.10.0
🧰 Tools
🪛 actionlint (1.7.4)

55-55: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


108-113: ⚠️ Potential issue

Fix the push branch in the Git push action

Using branch: ${{ github.ref }} may resolve to a full ref (e.g. refs/heads/main) and fail. Explicitly push to main (or use ${{ github.ref_name }} if you want dynamic branches):

-          branch: ${{ github.ref }}
+          branch: main
🧹 Nitpick comments (2)
.github/workflows/build_and_publish_docker.yml (2)

4-7: (Optional) Trigger on version tags for automated image publishing

If you’d like Docker images to build when you push a new version tag (e.g., v1.2.3), expand your trigger:

 on:
   push:
     branches: ["main"]
+    tags:
+      - 'v*'

26-27: Unify checkout action versions for consistency

You’re using both actions/checkout@v4.1.1 and actions/checkout@v4. It’s best to pin all to the same version to avoid unexpected behavior:

- uses: actions/checkout@v4
+ uses: actions/checkout@v4.1.1

Also applies to: 43-45, 79-82

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb48f0 and 2662007.

📒 Files selected for processing (1)
  • .github/workflows/build_and_publish_docker.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build_and_publish_docker.yml

55-55: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


58-58: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (1)
.github/workflows/build_and_publish_docker.yml (1)

62-63: Multi-platform build is correctly configured 👍

You’ve expanded to both linux/arm64 and linux/amd64, ensuring broader compatibility.

Comment on lines +12 to +15
env:
DOCKER_IMAGE_REGISTRY: "ghcr.io"
DOCKER_USERNAME: "elie222"

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Make the Docker username dynamic

Hard-coding DOCKER_USERNAME: "elie222" forces a manual update after merging. Switch to github.repository_owner so it works in both forks and your main repo without edits:

 env:
   DOCKER_IMAGE_REGISTRY: "ghcr.io"
-  DOCKER_USERNAME: "elie222"
+  DOCKER_USERNAME: "${{ github.repository_owner }}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
env:
DOCKER_IMAGE_REGISTRY: "ghcr.io"
DOCKER_USERNAME: "elie222"
env:
DOCKER_IMAGE_REGISTRY: "ghcr.io"
DOCKER_USERNAME: "${{ github.repository_owner }}"

@elie222 elie222 merged commit 53ea066 into elie222:main May 12, 2025
1 of 2 checks passed
@elie222
Copy link
Owner

elie222 commented May 12, 2025

Thanks!

@elie222
Copy link
Owner

elie222 commented May 12, 2025

@gowthamkishore3799 bug: #433

@akash329d
Copy link

I think this doesn't run the DB migration on startup like the previous dev image did, so doesn't work for self hosts easily.

@elie222
Copy link
Owner

elie222 commented Jul 20, 2025

Hey, don't think I changed anything here? Do you want to make an additional PR to add the changes in you want?

This was referenced Aug 18, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 19, 2025
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.

3 participants