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

Add dynamic compose for dokuwiki #5404

Merged
merged 11 commits into from
Dec 25, 2024

Conversation

viktor-c
Copy link
Contributor

@viktor-c viktor-c commented Nov 4, 2024

Changed configs to dynamic compose for dokuwiki.
Checked on a fresh install.

Summary by CodeRabbit

  • New Features

    • Introduced dynamic configuration support for DokuWiki.
    • Added a new Docker Compose configuration for the DokuWiki service.
  • Updates

    • Updated DokuWiki version references to "2024-02-06b-ls250".
    • Modified Docker Compose image to use the latest DokuWiki image version.

These changes enhance configuration flexibility and ensure users benefit from the latest features and improvements.

Copy link
Contributor

coderabbitai bot commented Nov 4, 2024

Walkthrough

The pull request introduces updates to the DokuWiki configuration and Docker Compose files. In config.json, a new property "dynamic_config": true is added, the "tipi_version" is updated from 2 to 3, and the "version" field is changed to "2024-02-06b-ls250". A new Docker Compose configuration file is created, defining a service for DokuWiki with specific settings, including a health check and environment variables. The existing Docker Compose YAML file is modified to use the latest image version.

Changes

File Path Change Summary
apps/dokuwiki/config.json - Added property: "dynamic_config": true
- Updated "tipi_version" from 2 to 3
- Updated "version" from "2022-07-31a-ls158" to "2024-02-06b-ls250"
- Updated "updated_at" timestamp.
apps/dokuwiki/docker-compose.json - New service added: dokuwiki with configurations including image, ports, volumes, environment variables, and health check.
apps/dokuwiki/docker-compose.yml - Updated image version from lscr.io/linuxserver/dokuwiki:2022-07-31a-ls158 to lscr.io/linuxserver/dokuwiki:2024-02-06b-ls250.

Possibly related PRs

Suggested reviewers

  • meienberger
  • steveiliop56

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (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.

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

🧹 Outside diff range and nitpick comments (2)
apps/dokuwiki/docker-compose.json (2)

15-17: Consider adding recommended environment variables.

The linuxserver/dokuwiki image supports additional environment variables that could improve the container's functionality:

       "environment": {
-        "TZ": "${TZ}"
+        "TZ": "${TZ}",
+        "PUID": "1000",
+        "PGID": "1000",
+        "PHP_MEMORY_LIMIT": "256M"
       },

25-30: Enhance health check reliability.

The current health check can be improved for better reliability:

       "healthCheck": {
-        "test": "curl --fail http://localhost || exit 1",
+        "test": "curl -sf --max-time 5 --retry 3 http://localhost/doku.php || exit 1",
         "retries": 3,
-        "interval": "30s",
+        "interval": "15s",
         "timeout": "10s"
+        "start_period": "30s"
       }

Changes:

  • Added -s for silent mode and specific endpoint check
  • Added --max-time and --retry flags for better curl behavior
  • Reduced interval for faster failure detection
  • Added start_period to allow for initial setup
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1e83ecb and b8e22e0.

📒 Files selected for processing (3)
  • apps/dokuwiki/config.json (1 hunks)
  • apps/dokuwiki/docker-compose.json (1 hunks)
  • apps/dokuwiki/docker-compose.yml (1 hunks)
🔇 Additional comments (5)
apps/dokuwiki/docker-compose.json (2)

8-14: LGTM! Volume configuration follows best practices.

The volume mapping is correctly configured for data persistence using the appropriate environment variable and necessary write permissions.


18-24: LGTM! Port configuration is appropriate.

The port mapping uses a high port number to avoid conflicts, and TCP is correctly specified for HTTP traffic.

apps/dokuwiki/config.json (2)

7-7: LGTM on dynamic_config addition.

The addition of "dynamic_config": true aligns with the PR objective of implementing dynamic compose for dokuwiki.

Let's verify this is the standard way to enable dynamic compose:

✅ Verification successful

Dynamic config flag usage is consistent with other apps

The "dynamic_config": true setting follows the established pattern used across numerous other applications in the repository (found in 44 other apps including adguard, gitea, homepage, etc.), confirming this is the standard way to enable dynamic compose functionality.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other apps using dynamic_config to confirm the pattern
rg '"dynamic_config":\s*true' apps/*/config.json

Length of output: 9633


9-9: Please verify the tipi_version bump compatibility.

The major version bump from 2 to 3 could indicate breaking changes. Please ensure:

  1. All dependent systems are compatible with tipi_version 3
  2. Migration steps are documented if needed

Let's check other apps' tipi versions:

✅ Verification successful

Let me analyze the tipi_version distribution across apps to verify the compatibility of version 3:

  1. There are many apps with tipi_version 3, including: baikal, barrage, chatpad, cloudflare-ddns, codex-docs, deluge, emby, emqx, excalidraw, flightlog, haven, heimdall, hello-world, homeassistant, homer, kapowarr, kasm-workspaces, libreddit, librespeed, mempool, nginx, openbooks, podfetch, send, suwayomi, umami, uptime-kuma, whisparr, write-freely.

  2. There are apps with both lower versions (1-2) and higher versions (up to 352), showing that different versions can coexist in the ecosystem.

  3. The presence of multiple other apps already using tipi_version 3 indicates it's a stable and compatible version.

The tipi_version 3 bump is compatible with the ecosystem.

  • Multiple apps are already running with tipi_version 3 successfully
  • The version range (1-352) shows version 3 is well within the supported spectrum
  • No evidence of breaking changes or compatibility issues found
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check tipi_version distribution across apps
echo "Distribution of tipi_version values:"
rg -o '"tipi_version":\s*\d+' apps/*/config.json | sort | uniq -c

Length of output: 21787

apps/dokuwiki/docker-compose.yml (1)

4-4: ⚠️ Potential issue

Consider using a specific version tag instead of latest.

Using the latest tag in production environments can lead to several issues:

  • Non-deterministic deployments
  • Unexpected breaking changes during updates
  • Difficult rollbacks
  • Complicated version tracking

Consider pinning to a specific version (e.g., 2022-07-31a-ls158) and implementing a controlled version upgrade strategy.

Let's check the available versions and recent changes:

apps/dokuwiki/docker-compose.json Outdated Show resolved Hide resolved
apps/dokuwiki/config.json Outdated Show resolved Hide resolved
viktor-c and others added 2 commits November 7, 2024 23:12
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Lancelot-Enguerrand
Copy link
Collaborator

Hello @viktor-c,

Thank you for your contribution, this one is greatly appreciated. 😊

Can you make some modifications :

  • Remove the addPorts section
  • Update docker compose.yml to reflect the new dokuwiki version

Copy link
Contributor

Thank you for your contribution!

Unfortunately, we are no longer accepting pull requests from external collaborators due to the high volume of PRs we have to deal with daily.

We have reached a point in which it has become too complicated to validate, test and maintain this huge amount of apps resulting in a poor experience for our users.

We are working at the moment to implement a new feature to allow you to add multiple app stores to your Runtipi instance, so you can add your own apps without the need to send a PR to our repository.

This feature will be available very soon, so stay tuned! In the mean time, if you really need your app in Runtipi, you can add your own repository to your Runtipi instance relevant docs

apps/dokuwiki/docker-compose.json Outdated Show resolved Hide resolved
apps/dokuwiki/docker-compose.yml Outdated Show resolved Hide resolved
Copy link
Contributor

Thank you for your contribution!

Unfortunately, we are no longer accepting pull requests from external collaborators due to the high volume of PRs we have to deal with daily.

We have reached a point in which it has become too complicated to validate, test and maintain this huge amount of apps resulting in a poor experience for our users.

We are working at the moment to implement a new feature to allow you to add multiple app stores to your Runtipi instance, so you can add your own apps without the need to send a PR to our repository.

This feature will be available very soon, so stay tuned! In the mean time, if you really need your app in Runtipi, you can add your own repository to your Runtipi instance relevant docs

@github-actions github-actions bot closed this Dec 24, 2024
@viktor-c
Copy link
Contributor Author

@Lancelot-Enguerrand Thank you for your comments, changed the code as wished.
I had originally changed to a fixed version because codeRabbit suggested above to do this
"Consider pinning to a specific version instead of using 'latest'."

Copy link
Contributor

Thank you for your contribution!

Unfortunately, we are no longer accepting pull requests from external collaborators due to the high volume of PRs we have to deal with daily.

We have reached a point in which it has become too complicated to validate, test and maintain this huge amount of apps resulting in a poor experience for our users.

We are working at the moment to implement a new feature to allow you to add multiple app stores to your Runtipi instance, so you can add your own apps without the need to send a PR to our repository.

This feature will be available very soon, so stay tuned! In the mean time, if you really need your app in Runtipi, you can add your own repository to your Runtipi instance relevant docs

Copy link
Collaborator

@Lancelot-Enguerrand Lancelot-Enguerrand left a comment

Choose a reason for hiding this comment

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

Hello @viktor-c
I may have been unclear on the version to use, my bad.
We prefer using fixed version for apps, to avoid unforseen breaking changes.

Which tag here ?
latest → no
version-2024-02-06b → almost equivalent to latest, so no
2024-02-06b-ls250 → stable, won't change, so yes

I hope to have cleared out any doubt.
Feel free to ask some questions if needed.

We should be ready to merge after this.

PS : CodeRabbit can be very useful but is subject to hallucination as it is an AI.
PS2 : It's not really a rabbit, sadly 😪

apps/dokuwiki/config.json Outdated Show resolved Hide resolved
apps/dokuwiki/config.json Show resolved Hide resolved
apps/dokuwiki/docker-compose.json Outdated Show resolved Hide resolved
apps/dokuwiki/docker-compose.json Outdated Show resolved Hide resolved
apps/dokuwiki/docker-compose.yml Outdated Show resolved Hide resolved
Copy link
Contributor

Thank you for your contribution!

Unfortunately, we are no longer accepting pull requests from external collaborators due to the high volume of PRs we have to deal with daily.

We have reached a point in which it has become too complicated to validate, test and maintain this huge amount of apps resulting in a poor experience for our users.

We are working at the moment to implement a new feature to allow you to add multiple app stores to your Runtipi instance, so you can add your own apps without the need to send a PR to our repository.

This feature will be available very soon, so stay tuned! In the mean time, if you really need your app in Runtipi, you can add your own repository to your Runtipi instance relevant docs

@github-actions github-actions bot closed this Dec 25, 2024
@viktor-c
Copy link
Contributor Author

I updated my branch https://github.com/viktor-c/runtipi-appstore/tree/dokuwiki-dynamic-compose
but I don't see the latest update here with the pull request... Can it be because the PR is closed?

Copy link
Contributor

Thank you for your contribution!

Unfortunately, we are no longer accepting pull requests from external collaborators due to the high volume of PRs we have to deal with daily.

We have reached a point in which it has become too complicated to validate, test and maintain this huge amount of apps resulting in a poor experience for our users.

We are working at the moment to implement a new feature to allow you to add multiple app stores to your Runtipi instance, so you can add your own apps without the need to send a PR to our repository.

This feature will be available very soon, so stay tuned! In the mean time, if you really need your app in Runtipi, you can add your own repository to your Runtipi instance relevant docs

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 (1)
apps/dokuwiki/docker-compose.json (1)

18-23: Consider enhancing the health check configuration

While the current health check is functional, it could be more robust with these improvements:

       "healthCheck": {
-        "test": "curl --fail http://localhost || exit 1",
+        "test": "curl --fail --silent --show-error --max-time 5 http://localhost || exit 1",
         "retries": 3,
-        "interval": "30s",
+        "interval": "15s",
         "timeout": "10s"
       }

This change:

  • Adds timeout to curl command to prevent hanging
  • Makes curl output cleaner with --silent --show-error
  • Reduces interval for faster container readiness detection
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 35ff4b9 and 61ad187.

📒 Files selected for processing (3)
  • apps/dokuwiki/config.json (2 hunks)
  • apps/dokuwiki/docker-compose.json (1 hunks)
  • apps/dokuwiki/docker-compose.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/dokuwiki/docker-compose.yml
  • apps/dokuwiki/config.json
🔇 Additional comments (5)
apps/dokuwiki/docker-compose.json (5)

1-5: LGTM! Image version is properly pinned

The service configuration follows best practices with a specific version tag rather than using 'latest', which aligns with the requested changes.


6-7: LGTM! Port configuration is correctly implemented

The port configuration correctly uses only internalPort as requested, allowing the host port to be managed through config.json.


8-14: LGTM! Volume configuration is appropriate

The volume configuration correctly maps the config directory with appropriate permissions for DokuWiki's functionality.


15-17: LGTM! Environment configuration is minimal and appropriate

The environment configuration includes only the necessary timezone variable.


26-26: Add a newline at the end of the file

As requested in previous comments, please add a blank line at the end of the file.

   ]
-}
+}
+

@Lancelot-Enguerrand Lancelot-Enguerrand merged commit f722bf8 into runtipi:master Dec 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants