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: Adding Docker Compose for local dev #3847

Merged
merged 80 commits into from
Feb 6, 2025
Merged

Conversation

yhakbar
Copy link
Collaborator

@yhakbar yhakbar commented Feb 6, 2025

Description

Adds a docker-compose.yml and Dockerfile to the docs-starlight directory to allow for local development of the Starlight documentation site without installing anything else.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added Docker Compose setup for docs-starlight.

Summary by CodeRabbit

  • New Features
    • Added a container orchestration configuration that supports live reloading and a streamlined local development experience.
  • Chores
    • Updated the application environment to use a stable Node.js runtime with npm for dependency management.
  • Documentation
    • Revised the project task list to reflect completed setup milestones and highlight pending documentation parity items.

Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terragrunt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 9:00pm

Copy link
Contributor

coderabbitai bot commented Feb 6, 2025

Walkthrough

This pull request updates the Starlight project by modifying its container setup and task list. The Dockerfile now uses the Node.js image instead of the previous Bun image, switching the dependency installation from Bun to npm and updating the run command. A new Docker Compose configuration is added to define a "web" service with volume bindings and development settings. Additionally, the TODO file reflects progress on local development and documentation parity tasks.

Changes

File(s) Change Summary
docs-starlight/Dockerfile Changed base image from oven/bun:1.2.2 to node:22; updated dependency installation from bun to npm; modified the run command to "npm run dev -- --host 0.0.0.0"; retained a comment about a known bun bug.
docs-starlight/TODO.md Updated task statuses: marked "Docker compose local dev setup" and "Parity for all docs except CLI reference" as completed; added a pending checklist item for "Parity for CLI reference".
docs-starlight/docker-compose.yml Introduced new Docker Compose configuration defining a "web" service; set up build context from the current directory; bound the host directory to /app (excluding node_modules); exposed port 4321; set NODE_ENV to development.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant DC as Docker Compose
  participant Img as Docker Image (Dockerfile)
  participant App as Node.js Application

  Dev->>DC: Run "docker-compose up"
  DC->>Img: Build image using Dockerfile (FROM node:22)
  Img->>Img: Execute "npm install"
  Img->>App: Run "npm run dev -- --host 0.0.0.0"
  App->>DC: Listen on port 4321
Loading

Poem

In our code, a fresh new beat,
Node replaces Bun, neat and sweet.
Tasks checked off, docs aligned,
Containers built with change refined.
Cheers to progress and dev delight,
May our servers shine so bright!

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

denis256
denis256 previously approved these changes Feb 6, 2025
Base automatically changed from feat/content-parity-with-current-docs-site to main February 6, 2025 20:58
@yhakbar yhakbar dismissed denis256’s stale review February 6, 2025 20:58

The base branch was changed.

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: 0

🧹 Nitpick comments (2)
docs-starlight/TODO.md (2)

8-11: Markdown Indentation: Infrastructure Section Needs Tweaking
The markdownlint tool flags MD007 issues here. It looks like the top-level list items (lines 8–9) have an extra leading space, and the nested items (lines 10–11) have one space too many. Aligning these entries to the expected indentation (0 spaces for top-level and 2 spaces for nested items) will clear the warnings.

Would you like a diff suggestion to standardize the markdown list formatting in this section?

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

8-8: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


9-9: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


10-10: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


11-11: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


14-16: Markdown Indentation: Content Section Adjustments
Similarly, the MD007 warnings indicate that the list items in the Content section need alignment adjustments. The top-level content item (line 14) and its nested entries (lines 15–16) currently have one extra space. Correcting the indentation to meet the expected levels will improve readability and comply with linting rules.

Let me know if you’d like a diff suggestion for these adjustments.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

14-14: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


15-15: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


16-16: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 33886d0 and a715b18.

📒 Files selected for processing (3)
  • docs-starlight/Dockerfile (1 hunks)
  • docs-starlight/TODO.md (1 hunks)
  • docs-starlight/docker-compose.yml (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs-starlight/TODO.md

8-8: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


9-9: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


10-10: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


11-11: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


14-14: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


15-15: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


16-16: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unessential
  • GitHub Check: build-and-test
  • GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (2)
docs-starlight/docker-compose.yml (1)

1-14: Docker Compose Setup is Spot On!
This configuration clearly defines a web service with a proper build context, live reload volume mappings (including an exclusion for node_modules), port exposure for the Astro dev server, and the appropriate NODE_ENV setting for development. Great work in streamlining the local dev experience for the docs!

docs-starlight/Dockerfile (1)

17-28: Smooth Transition to Node.js!
Switching from the previous Bun-based image to node:22 is handled well. The updated commands—using npm install for dependency installation and npm run dev -- --host 0.0.0.0 for starting the development server—ensure that the container exposes the app correctly for local testing. The helpful comment about the Bun bug provides useful context too.

@yhakbar yhakbar enabled auto-merge (squash) February 6, 2025 21:05
@yhakbar yhakbar merged commit 70b8959 into main Feb 6, 2025
8 of 9 checks passed
@yhakbar yhakbar deleted the feat/local-dev-improvements branch February 6, 2025 21:06
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.

2 participants