Description and Error Message
POST /api/v1/services rejects connect_to_docker_network when you create a service from docker_compose_raw. The request fails with:
422 {"message":"Validation failed.","errors":{"connect_to_docker_network":["This field is not allowed."]}}
The field is meant to be accepted on this path. The custom-compose branch of create_service lists it in its own $allowedFields and validates it as boolean (ServicesController.php#L589-L600 @ v4.3.23). But the request never gets that far. The top-level $allowedFields at the start of create_service (L362) does not include connect_to_docker_network, and the extra-fields check at L400 returns the 422 before the code branches on type vs docker_compose_raw.
PATCH /api/v1/services/{uuid} accepts the field (L1178). The only workaround is to create without it and PATCH afterwards. That needs an extra round trip, and the flag only takes effect on the next start, so the service can't be created and deployed in one step with the network attached (see #11295 / #11371 for how the flag is applied post-up).
Steps to Reproduce
POST /api/v1/services with project_uuid, server_uuid, environment_name, a valid docker_compose_raw, and "connect_to_docker_network": true.
- Observe the 422
This field is not allowed.
- Repeat without the field and then
PATCH it to true. That succeeds.
Example Repository URL
N/A (API only). Reproduced through the coolify-terraform/coolify provider 0.1.23, which sends the field on create.
Coolify Version
v4.3.18 (reproduced live). The code path is unchanged in v4.3.23.
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04
Additional Information
Suggested fix: add connect_to_docker_network to the top-level $allowedFields in create_service (the one-click type path already forces it to true, so it's harmless there).
Description and Error Message
POST /api/v1/servicesrejectsconnect_to_docker_networkwhen you create a service fromdocker_compose_raw. The request fails with:The field is meant to be accepted on this path. The custom-compose branch of
create_servicelists it in its own$allowedFieldsand validates it asboolean(ServicesController.php#L589-L600 @ v4.3.23). But the request never gets that far. The top-level$allowedFieldsat the start ofcreate_service(L362) does not includeconnect_to_docker_network, and the extra-fields check at L400 returns the 422 before the code branches ontypevsdocker_compose_raw.PATCH /api/v1/services/{uuid}accepts the field (L1178). The only workaround is to create without it and PATCH afterwards. That needs an extra round trip, and the flag only takes effect on the next start, so the service can't be created and deployed in one step with the network attached (see #11295 / #11371 for how the flag is applied post-up).Steps to Reproduce
POST /api/v1/serviceswithproject_uuid,server_uuid,environment_name, a validdocker_compose_raw, and"connect_to_docker_network": true.This field is not allowed.PATCHit totrue. That succeeds.Example Repository URL
N/A (API only). Reproduced through the
coolify-terraform/coolifyprovider 0.1.23, which sends the field on create.Coolify Version
v4.3.18 (reproduced live). The code path is unchanged in v4.3.23.
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04
Additional Information
Suggested fix: add
connect_to_docker_networkto the top-level$allowedFieldsincreate_service(the one-clicktypepath already forces it totrue, so it's harmless there).