Skip to content

Conversation

@Siumauricio
Copy link
Contributor

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

Issues related (if applicable)

closes

Screenshots (if applicable)

@Siumauricio Siumauricio requested a review from Copilot December 21, 2025 07:41
Copy link

Copilot AI left a 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 webServerSettings table 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.

Comment on lines +378 to +379
// For Dokploy server type, we don't have a specific organizationId
// This might need to be adjusted based on your business logic
Copy link

Copilot AI Dec 21, 2025

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.

Suggested change
// 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.

Copilot uses AI. Check for mistakes.
Comment on lines +37 to +39
} as {
enableDockerCleanup: boolean;
serverId?: string;
Copy link

Copilot AI Dec 21, 2025

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.

Suggested change
} as {
enableDockerCleanup: boolean;
serverId?: string;

Copilot uses AI. Check for mistakes.
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