Skip to content

Docker compose migration #1692

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

Merged
merged 4 commits into from
Apr 23, 2025
Merged

Docker compose migration #1692

merged 4 commits into from
Apr 23, 2025

Conversation

rharkor
Copy link
Contributor

@rharkor rharkor commented Feb 11, 2025

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

  • Checked the installation of the new docker compose version following the DOCKER_INSTALLATION.md
  • Ran the commands pnpm run docker / pnpm run docker:stop

Changelog

Replaced the old docker-compose version with the new docker compose command since the old one is deprecated, according to:


💯

Summary by CodeRabbit

  • Documentation
    • Updated Docker Compose installation instructions to use the new Docker CLI plugin method with improved setup and verification steps.
  • Chores
    • Revised Docker-related script commands to adopt the updated docker compose syntax for managing services.

Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: 973ee26

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Feb 11, 2025

Walkthrough

The changes update documentation and script commands to reflect the shift from the deprecated docker-compose command to the new docker compose syntax. The installation instructions now detail the creation of a Docker config directory and a CLI plugins subdirectory, specifying the new binary download location and updated permission commands. Similarly, script commands in the project’s package configuration have been revised to invoke Docker using the updated command format.

Changes

File(s) Change Summary
DOCKER_INSTALLATION.md
package.json
Updated Docker command syntax from docker-compose to docker compose. In the installation document, additional steps include creating a Docker config/CLI plugins directory, updating the binary download location, permission commands, and verification output. Script commands in package.json were similarly updated to align with the new syntax.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant S as System
    U->>S: Create Docker config and CLI plugins directories
    U->>S: Download Docker Compose binary to CLI plugins directory
    U->>S: Update file permissions at new location
    U->>S: Run verification with "docker compose" command
    S-->>U: Return installation success info
Loading

Poem

I'm a rabbit with a coding flair,
Hoping through docs without a care.
"docker-compose" now hops aside,
"docker compose" leads the ride.
With directories and commands so new,
My code garden feels fresh as dew! 🐇


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.
    • 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.
  • @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.

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

🧹 Nitpick comments (3)
DOCKER_INSTALLATION.md (3)

11-11: Fix grammar: "setup" should be "set up".

The word "setup" is a noun, while "set up" is the correct verb form.

-First you need to setup docker compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene.
+First you need to set up docker compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene.
🧰 Tools
🪛 LanguageTool

[grammar] ~11-~11: The word “setup” is a noun. The verb is spelled with a space.
Context: ... you can avoid that. First you need to setup docker compose as it is an underlying t...

(NOUN_VERB_CONFUSION)


54-56: Add language specifier to the code block.

For consistency and proper syntax highlighting, specify the language for the code block.

-   ```
+   ```shell
    Docker Compose version vX.Y.Z
    ```
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

54-54: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


60-60: Add comma before "and" in compound sentence.

For better readability, add a comma before "and" as it connects two independent clauses.

-When you've verified that the `docker compose` package is installed and you proceed to start Docker with `pnpm run docker`.
+When you've verified that the `docker compose` package is installed, and you proceed to start Docker with `pnpm run docker`.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~60-~60: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...he docker compose package is installed and you proceed to start Docker with `pnpm ...

(COMMA_COMPOUND_SENTENCE)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bb65b26 and de0220b.

📒 Files selected for processing (2)
  • DOCKER_INSTALLATION.md (1 hunks)
  • package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • package.json
🧰 Additional context used
🪛 LanguageTool
DOCKER_INSTALLATION.md

[grammar] ~11-~11: The word “setup” is a noun. The verb is spelled with a space.
Context: ... you can avoid that. First you need to setup docker compose as it is an underlying t...

(NOUN_VERB_CONFUSION)


[uncategorized] ~60-~60: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...he docker compose package is installed and you proceed to start Docker with `pnpm ...

(COMMA_COMPOUND_SENTENCE)

🪛 markdownlint-cli2 (0.17.2)
DOCKER_INSTALLATION.md

54-54: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

🔇 Additional comments (1)
DOCKER_INSTALLATION.md (1)

1-136: LGTM! The Docker Compose migration is well documented.

The changes successfully update the installation instructions to use the new docker compose command, providing clear and comprehensive guidance for all supported platforms.

🧰 Tools
🪛 LanguageTool

[grammar] ~11-~11: The word “setup” is a noun. The verb is spelled with a space.
Context: ... you can avoid that. First you need to setup docker compose as it is an underlying t...

(NOUN_VERB_CONFUSION)


[uncategorized] ~60-~60: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...he docker compose package is installed and you proceed to start Docker with `pnpm ...

(COMMA_COMPOUND_SENTENCE)

🪛 markdownlint-cli2 (0.17.2)

3-3: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)


54-54: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


```shell
sudo apt install curl
curl -SL "https://github.com/docker/compose/releases/download/latest/docker-compose-$(uname -s)-$(uname -m)" -o $DOCKER_CONFIG/cli-plugins/docker-compose
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

Avoid using "latest" tag in the download URL.

Using "latest" in the download URL can lead to reproducibility issues as different users might get different versions. Consider specifying a fixed version number.

Let's check the latest stable version of Docker Compose:


🌐 Web query:

What is the latest stable version of Docker Compose?

💡 Result:

The latest stable version of Docker Compose is v2.32.4, released on January 16, 2025[1][3][4]. This update includes critical bug fixes such as resolving an issue where docker compose version did not display properly[3][4].

Docker Compose V2 has been the default and actively maintained version since July 2023[1][5], replacing the deprecated V1 (last updated in May 2021)[1][6]. Key improvements in recent versions include:

  • Enhanced build performance with BuildKit
  • Support for service hooks and CDI device requests (v2.30.0)[3]
  • Improved network configuration detection (v2.29.2)[3]
  • Synchronized file shares for bind mounts (v2.26.0)[3]

For new installations, Docker Desktop automatically includes Compose V2[1][5]. Linux users can manually install it using:

docker compose version

which should return Docker Compose version v2.32.4[3][4].

Citations:


Update download URL to avoid using "latest" tag in favor of a fixed version.

The current line uses:

curl -SL "https://github.com/docker/compose/releases/download/latest/docker-compose-$(uname -s)-$(uname -m)" -o $DOCKER_CONFIG/cli-plugins/docker-compose

This approach can lead to reproducibility issues. Our web query confirms that the latest stable version of Docker Compose is v2.32.4. Consider updating the URL to specify this version number:

  • Replace latest with v2.32.4 (or another fixed version) to ensure consistency across installations.

@nicktrn
Copy link
Collaborator

nicktrn commented Apr 23, 2025

Hey @rharkor - thanks for this! We should really get this in. Would be good if this didn't break existing dev setups.

Have you tested what happens to existing containers? Specifically:

  1. The user ran docker using the old docker-compose command
  2. The user runs it again with these changes, i.e. with docker compose
  3. What happens to the existing resources? Are there any errors or duplicates?

I think I ran into issues with this previously. Would be great to know what happens before we get a chance to test the new instructions myself. Thanks again 🙏

@rharkor
Copy link
Contributor Author

rharkor commented Apr 23, 2025

Hey @nicktrn following the documentation it seems that you will need to stop every container before restarting theme because compose v1 use "_" and compose v2 use "-" as separator

https://docs.docker.com/compose/releases/migrate/

@nicktrn
Copy link
Collaborator

nicktrn commented Apr 23, 2025

Ah perfect, that's what I was looking for!

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

♻️ Duplicate comments (1)
DOCKER_INSTALLATION.md (1)

27-27: Pin Docker Compose version for reproducible installs
To avoid pulling an unpredictable version, specify a fixed release (e.g., v2.32.4) instead of using latest in the download URL.

🧹 Nitpick comments (3)
DOCKER_INSTALLATION.md (3)

11-11: Correct verb usage: "set up" vs "setup"
The word “setup” is a noun; here you need the verb form “set up” when instructing the user.

🧰 Tools
🪛 LanguageTool

[grammar] ~11-~11: The word “setup” is a noun. The verb is spelled with a space.
Context: ... you can avoid that. First you need to setup docker compose as it is an underlying t...

(NOUN_VERB_CONFUSION)


55-57: Specify the language for the output code block
The fenced code block showing the version output should declare a language (e.g., text or bash) to satisfy markdown lint rules.


60-60: Add comma for compound sentence clarity
Insert a comma before “and” to separate independent clauses:
“When you’ve verified that the docker compose package is installed, and you proceed to start Docker…”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~60-~60: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...he docker compose package is installed and you proceed to start Docker with `pnpm ...

(COMMA_COMPOUND_SENTENCE)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between de0220b and 973ee26.

📒 Files selected for processing (1)
  • DOCKER_INSTALLATION.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
DOCKER_INSTALLATION.md

[grammar] ~11-~11: The word “setup” is a noun. The verb is spelled with a space.
Context: ... you can avoid that. First you need to setup docker compose as it is an underlying t...

(NOUN_VERB_CONFUSION)


[uncategorized] ~60-~60: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...he docker compose package is installed and you proceed to start Docker with `pnpm ...

(COMMA_COMPOUND_SENTENCE)

🪛 markdownlint-cli2 (0.17.2)
DOCKER_INSTALLATION.md

54-54: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

Copy link
Collaborator

@nicktrn nicktrn left a comment

Choose a reason for hiding this comment

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

I tested everything works and only made two small changes:

  • Fixed the download URL for the latest release
  • Made the electric container name static (it's the only one that wasn't)

We don't use the dev compose so I haven't touched it.

Thanks again @rharkor!

@nicktrn nicktrn merged commit 0726620 into triggerdotdev:main Apr 23, 2025
1 check 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.

2 participants