-
Notifications
You must be signed in to change notification settings - Fork 294
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 kimai #6773
Conversation
WalkthroughThis pull request updates the Kimai application configuration by adding a new dynamic configuration property and bumping several version numbers. Additionally, a new Docker Compose configuration file is introduced to define and orchestrate three services (proxy, application, and SQL database) with proper interdependencies and health checks. The existing Docker Compose YAML file is also updated to use the new image version for the Kimai service. Changes
Sequence Diagram(s)sequenceDiagram
participant DC as Docker Compose
participant DB as Kimai SQLDB
participant KA as Kimai App
participant KP as Kimai Proxy
participant C as Client
DC->>DB: Start MySQL container
DC->>KA: Start Kimai container (depends on DB)
DC->>KP: Start Nginx Proxy container (depends on Kimai)
C->>KP: Send request
KP->>KA: Forward request
KA->>DB: Query database
DB-->>KA: Return data
KA-->>KP: Return response
KP-->>C: Deliver response
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: 0
🧹 Nitpick comments (3)
apps/kimai/config.json (1)
48-48
: Updated Timestamp.
The"updated_at"
value has been refreshed, which appears to correctly reflect the latest change. Ensure that this timestamp is in sync with your deployment or logging systems if required.apps/kimai/docker-compose.json (1)
17-24
: Health Check for Proxy Service.
ThehealthCheck
section (lines 17–24) forkimai-proxy
is comprehensive with proper intervals, timeouts, and a test command usingwget
. Verify that thewget --spider http://kimai-proxy/health || exit 1
command reliably reflects service health in all environments.apps/kimai/docker-compose.yml (1)
58-64
: Volume Mappings and Optional Mount Comments.
The volume mappings are correctly declared. Consider whether the commented-out optional mounts (e.g., LDAP configuration, certificate files) are needed; if not, cleaning them up could improve clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/kimai/config.json
(2 hunks)apps/kimai/docker-compose.json
(1 hunks)apps/kimai/docker-compose.yml
(1 hunks)
🔇 Additional comments (10)
apps/kimai/config.json (2)
6-6
: Dynamic Configuration Property Added.
The addition of"dynamic_config": true
enables dynamic adjustments to the configuration, aligning well with the PR’s objective of supporting dynamic compose.
9-10
: Version and Tipi Version Bumped.
Updating"tipi_version"
from 2 to 3 and"version"
to"fpm-2.19.1-prod"
ensures consistency with the new Kimai image version. Verify that all usage of these version numbers elsewhere is updated accordingly.apps/kimai/docker-compose.json (4)
1-10
: New Dynamic Compose Configuration Introduced.
The overall structure using"$schema": "../dynamic-compose-schema.json"
and the clear definitions for services likekimai-proxy
is well executed. This new file lays a good foundation for dynamic service composition.
25-32
: Kimai Service Definition.
Thekimai
service now references the updated image"kimai/kimai2:fpm-2.19.1-prod"
and sets the environment variables appropriately. Ensure that the referenced environment variables (e.g.,KIMAI_ADMINMAIL
,KIMAI_ADMINPASS
) are consistently provided during runtime.
33-42
: Volume Mappings for Kimai Service.
The volume mappings for both public and variable data are correctly configured, assisting in persistent and shared data use between deployments.
43-70
: SQL Database Service Configuration.
The configuration forkimai-sqldb
—including environment parameters, volume mapping, command, and health check—is correctly structured. Double-check that the health check command usingmysqladmin -p$$MYSQL_ROOT_PASSWORD ping -h localhost
behaves as intended in your shell environment.apps/kimai/docker-compose.yml (4)
1-4
: Compose File and Versioning.
The docker-compose file starts with version "3.5" and overall standards seem to adhere to best practices. This file remains coherent with previous configurations.
6-22
: Proxy Service Configuration.
The configuration for thenginx
service (lines 6–22) is detailed with port mapping, volume setup, restart policies, and health checks. All these are inline with production-ready setups.
50-57
: Kimai Service Update with New Image Version.
Thekimai
service (line 52 updated) now uses the image"kimai/kimai2:fpm-2.19.1-prod"
, which matches the updated configuration inconfig.json
and the new dynamic compose file. Review that the environment variables provided (ADMINMAIL, ADMINPASS, DATABASE_URL, TRUSTED_HOSTS) are correctly interpreted in the container.
66-90
: SQL Database Service Consistency.
The configuration forsqldb
(lines 66–90) remains consistent and robust—using MySQL 5.7 with clear environment variables, volume mapping, command definition, and a health check. The use of double dollar signs inmysqladmin -p$$MYSQL_ROOT_PASSWORD
is a common approach in docker-compose files, but verify that it expands as expected.
Dynamic compose for kimai
This is a kimai update for using dynamic compose.
Situation tested :
Reaching the app :
In app tests :
Volumes mapping verified :
Specific instructions verified :
Other change
Update to 2.19.1
Summary by CodeRabbit
New Features
Chores