Custom build server
What problem will this feature address?
The build process runs on the same server as my projects, which isn't ideal
Describe the solution you'd like
Use a separate server to build the projects
Describe alternatives you've considered
I can offload that build process to GitHub Actions, but it's extra effort, and it's not free
Additional context
This concept exists in Coolify https://coolify.io/docs/knowledge-base/server/build-server
We could plan it, I think it wouldn't be that difficult to implement, it's just that it would only be available for applications.
This would be a nice feature. any update on this ?
i could help develop this if it's ok i am new to contributing
I agree it would be very cool to have
This would be such a valuable feature, reduces costs by a lot for Next.js as they currently require 4GB RAM to build.
I think, move the build process to a container will help to safeguard the server.
By running builds in containers, you can set CPU and memory limits, which prevents the build from consuming more resources than intended and keeps the applications isolated from build workload spikes. This approach also makes builds more reproducible and portable.
And as a bonus, any external server with the docker engine can be used as a building server.
+1, This could really improve the multi/remote-server setup!
I start to looking in the dokploy code base, the build process retrieves application info, creates a deployment record, runs remote build commands(if needed), manages the Docker container and updates statuses.
https://github.com/Dokploy/dokploy/blob/b95dfed8fc49cb916cd42d1ca87884963ba475c3/packages/server/src/services/application.ts#L624-L670
getBuildCommand acts as a dispatcher that builds the correct shell command for the application, supporting multiple build systems(Dockerfile, buildpacks, static, etc.) and handling image uploads when a registry is involved.The returned command string is then executed remotely as part of the deployment process.
https://github.com/Dokploy/dokploy/blob/b95dfed8fc49cb916cd42d1ca87884963ba475c3/packages/server/src/utils/builders/index.ts#L79-L110
I'm thinking to create a wrapper function for the build command
function rebuildRemoteApplication(...)
// ...existing code...
if (application.serverId) {
if (application.sourceType !== "docker") {
let command = "set -e;";
command += getBuildCommand(application, deployment.logPath);
if (buildInDocker) {
const dockerCmd = `
docker run --rm \
-v ${<repositoryPath>}:/app \
-w /app \
<build-image> \
bash -c "${command.replace(/"/g, '\\"')}"
`;
command = dockerCmd;
}
// ...existing code...
@Siumauricio, do you have any updates on this?
I believe this feature would bring the true power of Dockploy into production use. Having the build on the production server isn't the best practice, and creating GitHub Actions undermines the significant advantage of auto-deploy.
I'm eagerly waiting for this feature to consider Dockploy as the first choice for production servers.
@Siumauricio, this feature is an absolute must-have for me. When my Docker build is running, the applications go down, because the build takes all resources. It would be much cheaper to have one beefy build server and several cheap application servers than scaling the app servers so they also can handle the build.
any plan?
+1, somebody please do this!
+1, would love this feature
@Siumauricio I would like to work on this.
But no point on starting if the task is already in progress by any other members. Can you tell if its in progress or not started?
+1
If you have time to work on this I'm open to accept this! @shreekrishnalamichhane
+1
+1
Custom Build is finally finished!!
https://github.com/Dokploy/dokploy/pull/3138 In the next minor version should be available 😃
It only took 1year to get this done. But in the end it was done. I love open source
When my Docker build is running, the applications go down, because the build takes all resources.
Have you heard of the "nice" command yet? Did anyone ever use it to build on production server? Just curious if it works as intended or if it's a dead end.