-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
refactor(settings): migrate user settings to webServerSettings schema… #3327
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
base: canary
Are you sure you want to change the base?
Conversation
… and update related components
…ServerSettings schema and improve code clarity
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.
Pull request overview
This PR refactors user settings to use a new webServerSettings schema, separating web server configuration from user data. The changes migrate settings like server IP, SSL certificates, Docker cleanup, and metrics configuration from the user table to a dedicated web server settings singleton.
Key Changes:
- Created new
webServerSettingstable with dedicated service layer - Migrated web server configuration fields from user table to new schema
- Updated all references throughout codebase to use new settings service
Reviewed changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/server/src/db/schema/web-server-settings.ts | New schema defining web server settings with all configuration fields |
| packages/server/src/services/web-server-settings.ts | New service layer for web server settings operations |
| packages/server/src/db/schema/user.ts | Removed web server fields from user schema |
| apps/dokploy/drizzle/0133_striped_the_order.sql | Migration script to create new table and transfer data |
| packages/server/src/utils/traefik/web-server.ts | Updated to use webServerSettings type |
| packages/server/src/utils/backups/index.ts | Updated to fetch settings from new service |
| packages/server/src/utils/access-log/handler.ts | Updated log cleanup to use web server settings |
| packages/server/src/setup/monitoring-setup.ts | Updated monitoring setup to use new settings |
| packages/server/src/services/preview-deployment.ts | Updated to use web server settings service |
| packages/server/src/services/domain.ts | Updated domain generation to use new settings |
| packages/server/src/services/ai.ts | Updated AI service to use web server settings |
| packages/server/src/services/admin.ts | Updated admin service to use web server settings |
| packages/server/src/lib/auth.ts | Updated auth configuration to use web server settings |
| apps/dokploy/server/api/routers/* | Updated API routers to use new settings endpoints |
| apps/dokploy/components/dashboard/settings/* | Updated UI components to use new settings queries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // For Dokploy server type, we don't have a specific organizationId | ||
| // This might need to be adjusted based on your business logic |
Copilot
AI
Dec 21, 2025
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.
The comment indicates uncertainty about the business logic for organizationId assignment. Either implement the proper logic or clarify in the comment what the expected behavior should be.
| // For Dokploy server type, we don't have a specific organizationId | |
| // This might need to be adjusted based on your business logic | |
| // For Dokploy server type, notifications are not scoped to a specific organization. | |
| // An empty organizationId explicitly represents a global / unscoped notification. |
| } as { | ||
| enableDockerCleanup: boolean; | ||
| serverId?: string; |
Copilot
AI
Dec 21, 2025
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.
Using type assertion with as bypasses TypeScript's type checking. Consider defining the proper input type or restructuring the code to avoid the type assertion.
| } as { | |
| enableDockerCleanup: boolean; | |
| serverId?: string; |
…ttings and streamline IP retrieval logic
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ance log cleanup status retrieval
…n update function
… and update related components
What is this PR about?
Please describe in a short paragraph what this PR is about.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
closes
Screenshots (if applicable)