-
Notifications
You must be signed in to change notification settings - Fork 279
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
App/sharry #4936
base: master
Are you sure you want to change the base?
App/sharry #4936
Conversation
WalkthroughThe changes introduced in this pull request consist of several new configuration files and templates for the Sharry application, a self-hosted file-sharing platform. These include a main configuration file ( Changes
Possibly related PRs
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Outside diff range and nitpick comments (9)
apps/sharry/metadata/description.md (3)
1-5
: Improve grammar in the introductionThe introduction provides a clear overview of Sharry. However, there's a minor grammatical issue that can be improved.
Consider updating line 5 to improve readability:
-Sharry allows to share files with others in a simple way. It is a self-hosted web application. The basic concept is: upload files and get a url back that can then be shared. +Sharry allows users to share files with others in a simple way. It is a self-hosted web application. The basic concept is: upload files and get a URL back that can then be shared.This change adds "users" as the object of "allows" and capitalizes "URL" as it's an acronym.
Tools
LanguageTool
[grammar] ~5-~5: Did you mean “sharing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...sharing web application. Sharry allows to share files with others in a simple way. It i...(ALLOW_TO)
7-7
: Enhance admin account setup instructionsThe instructions for setting up the admin account are clear, but can be improved for better readability and security emphasis.
Consider updating the admin account setup instructions:
-Standard Admin Account is `admin`:`admin`. Go to `Settings (3 lines) -> Accounts` and create a new admin user account. Login with the new account and disable / remove the standard admin account. +The standard Admin Account is `admin`:`admin`. For security reasons, it's crucial to change this immediately. Go to `Settings (3 lines) -> Accounts` and create a new admin user account. Login with the new account and disable / remove the standard admin account.This change improves grammar and emphasizes the importance of changing the default admin credentials for security.
9-13
: Use Markdown link syntax for URLsThe links provided are useful, but their presentation can be improved using Markdown link syntax.
Consider updating the links section as follows:
## Links -https://github.com/eikek/sharry +[GitHub Repository](https://github.com/eikek/sharry) -https://hub.docker.com/r/eikek0/sharry +[Docker Hub](https://hub.docker.com/r/eikek0/sharry)This change improves readability and follows Markdown best practices for formatting links.
Tools
Markdownlint
11-11: null
Bare URL used(MD034, no-bare-urls)
13-13: null
Bare URL used(MD034, no-bare-urls)
apps/sharry/docker-compose.json (2)
3-20
: Consider adding external port mapping for the Sharry service.The Sharry service is configured with an internal port of 9090, but there's no external port mapping specified. This means the service won't be directly accessible from outside the Docker network.
Consider adding an external port mapping if you want to access Sharry directly. For example:
"ports": [ { "published": 8080, "target": 9090 } ]This would make Sharry accessible on port 8080 of the host machine.
1-38
: Overall structure is good, with some security considerations.The Docker Compose configuration is well-structured and follows best practices. However, there are a few areas where security and clarity could be improved:
- Consider using Docker secrets for sensitive information, as mentioned earlier.
- The
${APP_DATA_DIR}
environment variable is used throughout the configuration. Ensure this variable is properly set and documented.- There's no explicit network configuration. While Docker Compose creates a default network, you might want to consider creating a custom network for better isolation and control.
To improve network isolation, you could add a custom network configuration:
"networks": [ { "name": "sharry_network", "driver": "bridge" } ],And then add a
networks
key to each service to specify which network they should join.Also, consider adding a
.env
file to your project to define theAPP_DATA_DIR
and other environment variables used in this configuration. This can help with clarity and ease of deployment.apps/sharry/config.json (2)
1-10
: LGTM! Consider adding a comment about the port number.The basic configuration looks good. The schema reference, availability settings, and version are all well-defined.
Consider adding a comment explaining why port 8681 was chosen, as it's a non-standard port. This can help prevent potential conflicts and provide context for future maintainers.
27-33
: LGTM! Consider adding a human-readable date format.The supported architectures and timestamps are correctly defined.
Consider adding a comment with a human-readable date format alongside the Unix timestamps. This can improve readability for maintainers. For example:
"created_at": 1727099286000, // 2024-09-23T12:34:46Z "updated_at": 1727099286000 // 2024-09-23T12:34:46Zapps/sharry/docker-compose.yml (2)
1-39
: LGTM! Minor indentation fix needed.The
sharry
service configuration looks good overall. It correctly sets up dependencies, mounts the configuration file, exposes the necessary port, and configures Traefik for routing and HTTPS.There's a minor indentation issue on line 4. Please adjust the indentation to match the rest of the file:
sharry: depends_on: - - db + - dbTools
yamllint
[warning] 4-4: wrong indentation: expected 6 but found 5
(indentation)
51-51
: Add a newline at the end of the file.To comply with YAML best practices and resolve the yamllint warning, add a newline at the end of the file.
Add a newline after the last line of the file.
Tools
yamllint
[error] 51-51: no new line character at the end of file
(new-line-at-end-of-file)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
apps/sharry/metadata/logo.jpg
is excluded by!**/*.jpg
Files selected for processing (5)
- apps/sharry/config.json (1 hunks)
- apps/sharry/data/sharry.conf.template (1 hunks)
- apps/sharry/docker-compose.json (1 hunks)
- apps/sharry/docker-compose.yml (1 hunks)
- apps/sharry/metadata/description.md (1 hunks)
Additional context used
yamllint
apps/sharry/docker-compose.yml
[warning] 4-4: wrong indentation: expected 6 but found 5
(indentation)
[error] 51-51: no new line character at the end of file
(new-line-at-end-of-file)
LanguageTool
apps/sharry/metadata/description.md
[grammar] ~5-~5: Did you mean “sharing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...sharing web application. Sharry allows to share files with others in a simple way. It i...(ALLOW_TO)
[uncategorized] ~6-~6: You might be missing the article “the” here.
Context: ...et a url back that can then be shared. Standard Admin Account isadmin
:admin
. Go to...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
Markdownlint
apps/sharry/metadata/description.md
11-11: null
Bare URL used(MD034, no-bare-urls)
13-13: null
Bare URL used(MD034, no-bare-urls)
Additional comments not posted (9)
apps/sharry/data/sharry.conf.template (3)
3-3
: LGTM: Flexible base URL configurationThe use of the
{{APP_DOMAIN}}
placeholder in the base URL configuration allows for easy customization across different deployment environments. This approach aligns with best practices for configuration management.
5-8
: Verify network security for the binding configurationThe server is configured to bind to all network interfaces (0.0.0.0) on port 9090. While this allows for flexible deployment, it may expose the server to unauthorized access if not properly secured.
Please ensure that:
- The server is behind a properly configured firewall or reverse proxy.
- Access to port 9090 is restricted to trusted networks only.
- Consider using environment-specific binding configurations for different deployment scenarios (e.g., localhost for development, specific IP for production).
20-24
: Verify signup configuration and provide more contextThe current signup configuration allows open registration, which may not be suitable for all deployment scenarios.
Please consider the following:
- Verify if open signup aligns with the security requirements of the intended deployment environment.
- Document the implications of the "open" signup mode in the project README or deployment guide.
- Consider making the signup mode configurable (e.g., using a placeholder like
{{SIGNUP_MODE}}
) to allow easy adjustment for different environments.- Provide more context or documentation about the "generate-invite" setting for the invite password. Its purpose and security implications are not immediately clear.
Example of a more flexible configuration:
signup { mode = "{{SIGNUP_MODE}}" invite-time = "{{INVITE_EXPIRATION_TIME}}" invite-password = "{{INVITE_PASSWORD_METHOD}}" }apps/sharry/metadata/description.md (1)
1-13
: Overall approval of the description fileThe
description.md
file provides a concise and informative overview of Sharry, including its main functionality, admin account setup instructions, and relevant links. The content is well-structured and covers the essential information users need to get started with Sharry.With the suggested minor improvements in grammar and formatting, this file will serve as an excellent introduction to Sharry for users of the Runtipi App Store.
Tools
LanguageTool
[grammar] ~5-~5: Did you mean “sharing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...sharing web application. Sharry allows to share files with others in a simple way. It i...(ALLOW_TO)
[uncategorized] ~6-~6: You might be missing the article “the” here.
Context: ...et a url back that can then be shared. Standard Admin Account isadmin
:admin
. Go to...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
Markdownlint
11-11: null
Bare URL used(MD034, no-bare-urls)
13-13: null
Bare URL used(MD034, no-bare-urls)
apps/sharry/docker-compose.json (2)
8-13
: Verify the content of the Sharry configuration file.The Sharry service is configured to use a specific configuration file mounted from the host system.
To ensure proper configuration, please verify the content of the
${APP_DATA_DIR}/data/sharry.conf
file. It should contain necessary settings for Sharry, including database connection details. You may want to provide a template or documentation for this configuration file.
23-23
: Consider long-term support for PostgreSQL version.You're using PostgreSQL 16.4-alpine, which is a recent version. This is good for having the latest features and security updates.
However, keep in mind that major version upgrades in databases can sometimes introduce breaking changes. Ensure you have a strategy for managing database upgrades and migrations as new versions are released.
apps/sharry/config.json (2)
11-18
: LGTM! Comprehensive metadata provided.The category, descriptions, and links are well-defined and provide valuable information about the application. The inclusion of both a detailed description and a short description is particularly useful for different contexts.
1-33
: Overall, excellent configuration file for Sharry.The
config.json
file is well-structured, comprehensive, and follows good practices for application configuration. It includes all necessary metadata, security considerations, and deployment information for the Sharry application.The minor suggestions provided in the review comments above can further enhance the clarity and completeness of the configuration, but they are not critical issues. Great job on setting up this configuration file!
apps/sharry/docker-compose.yml (1)
5-5
: Consider updating to the latest stable version.The current image version is
v1.14.0
. It's good that you've pinned the version, but you might want to check if there's a newer stable version available for potential bug fixes and improvements.To check for the latest version, you can run:
If a newer version is available, consider updating the image tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- apps/sharry/docker-compose.yml (1 hunks)
🧰 Additional context used
🪛 yamllint
apps/sharry/docker-compose.yml
[warning] 4-4: wrong indentation: expected 6 but found 5
(indentation)
[error] 53-53: no new line character at the end of file
(new-line-at-end-of-file)
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (1)
apps/sharry/docker-compose.yml (1)
13-14
: Consider network isolation improvements.While both services are correctly on the
tipi_main_network
, consider creating a dedicated network for Sharry's internal communication to improve security isolation.Add a new network specifically for Sharry:
networks: sharry_internal: driver: bridge tipi_main_network: external: trueThen update both services to use both networks:
networks: - tipi_main_network + - sharry_internal
This ensures that:
- Internal communication between Sharry and its database is isolated
- Only the Sharry application needs access to the database
- Other services on
tipi_main_network
cannot access the databaseAlso applies to: 52-53
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- apps/sharry/data/sharry.conf.template (1 hunks)
- apps/sharry/docker-compose.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/sharry/data/sharry.conf.template
🔇 Additional comments (1)
apps/sharry/docker-compose.yml (1)
9-10
: Verify the configuration file path and permissions.The configuration file is mounted at
/opt/sharry.conf
, but we need to ensure:
- The source file exists in the host's
${APP_DATA_DIR}/data/
directory- The file has appropriate read permissions for the container's user
✅ Verification successful
Let me gather more information about the configuration setup by checking related files in the repository.
Let me check the content of the template file we discovered and any related documentation that might explain the configuration setup.
Configuration file setup is properly structured and verified
The verification reveals that:
- The configuration template exists at
apps/sharry/data/sharry.conf.template
- The template contains valid configuration with proper syntax and necessary settings
- The Docker Compose setup correctly mounts this configuration at
/opt/sharry.conf
- The configuration includes essential settings like database connection, authentication, and network bindings
The configuration setup follows the expected pattern and should work correctly when the template variables (like
{{APP_DOMAIN}}
and{{DB_PASS}}
) are properly substituted during deployment.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the configuration template exists and verify its content if [ -f "apps/sharry/sharry.conf.template" ]; then echo "Template exists. Checking content..." cat apps/sharry/sharry.conf.template else echo "Warning: sharry.conf.template not found" fiLength of output: 134
Script:
#!/bin/bash # Search for any configuration related files in the sharry directory fd . apps/sharry # Check if there are any documentation files that might mention configuration rg -i "configuration|config|sharry.conf" apps/sharry -A 3Length of output: 1331
Script:
#!/bin/bash # Check the content of the template file cat apps/sharry/data/sharry.conf.template # Check if there's any documentation about configuration cat apps/sharry/metadata/description.mdLength of output: 1051
Sharry allows to share files with others in a simple way. It is a self-hosted web application. The basic concept is: upload files and get a url back that can then be shared.
https://github.com/eikek/sharry
Summary by CodeRabbit
Release Notes
New Features
Documentation