Coolify logoCoolify
POST
/applications/dockerfile

Create new application based on a simple Dockerfile (without git).

Authorization

bearerAuth
AuthorizationBearer <token>

Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.

In: header

Request Body

application/json

Application object that needs to be created.

TypeScript Definitions

Use the request body type in TypeScript.

project_uuid*string

The project UUID.

server_uuid*string

The server UUID.

environment_name*string

The environment name. You need to provide at least one of environment_name or environment_uuid.

environment_uuid*string

The environment UUID. You need to provide at least one of environment_name or environment_uuid.

dockerfile*string

The Dockerfile content.

build_pack?string

The build pack type.

Value in"nixpacks" | "static" | "dockerfile" | "dockercompose"
ports_exposes?string

The ports to expose.

destination_uuid?string

The destination UUID.

name?string

The application name.

description?string

The application description.

domains?string

The application URLs in a comma-separated list.

docker_registry_image_name?string

The docker registry image name.

docker_registry_image_tag?string

The docker registry image tag.

ports_mappings?string

The ports mappings.

base_directory?string

The base directory for all commands.

health_check_enabled?boolean

Health check enabled.

health_check_path?string

Health check path.

health_check_port?string

Health check port.

health_check_host?string

Health check host.

health_check_method?string

Health check method.

health_check_return_code?integer

Health check return code.

health_check_scheme?string

Health check scheme.

health_check_response_text?string

Health check response text.

health_check_interval?integer

Health check interval in seconds.

health_check_timeout?integer

Health check timeout in seconds.

health_check_retries?integer

Health check retries count.

health_check_start_period?integer

Health check start period in seconds.

limits_memory?string

Memory limit.

limits_memory_swap?string

Memory swap limit.

limits_memory_swappiness?integer

Memory swappiness.

limits_memory_reservation?string

Memory reservation.

limits_cpus?string

CPU limit.

limits_cpuset?string

CPU set.

limits_cpu_shares?integer

CPU shares.

custom_labels?string

Custom labels.

custom_docker_run_options?string

Custom docker run options.

post_deployment_command?string

Post deployment command.

post_deployment_command_container?string

Post deployment command container.

pre_deployment_command?string

Pre deployment command.

pre_deployment_command_container?string

Pre deployment command container.

manual_webhook_secret_github?string

Manual webhook secret for Github.

manual_webhook_secret_gitlab?string

Manual webhook secret for Gitlab.

manual_webhook_secret_bitbucket?string

Manual webhook secret for Bitbucket.

manual_webhook_secret_gitea?string

Manual webhook secret for Gitea.

redirect?string

How to set redirect with Traefik / Caddy. www<->non-www.

Value in"www" | "non-www" | "both"
instant_deploy?boolean

The flag to indicate if the application should be deployed instantly.

is_force_https_enabled?boolean

The flag to indicate if HTTPS is forced. Defaults to true.

use_build_server?boolean

Use build server.

is_http_basic_auth_enabled?boolean

HTTP Basic Authentication enabled.

http_basic_auth_username?string

Username for HTTP Basic Authentication

http_basic_auth_password?string

Password for HTTP Basic Authentication

connect_to_docker_network?boolean

The flag to connect the service to the predefined Docker network.

force_domain_override?boolean

Force domain usage even if conflicts are detected. Default is false.

autogenerate_domain?boolean

If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Default: true.

Defaulttrue
is_container_label_escape_enabled?boolean

Escape special characters in labels. By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$. If you want to use env variables inside the labels, turn this off.

Defaulttrue

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://app.coolify.io/api/v1/applications/dockerfile" \  -H "Content-Type: application/json" \  -d '{    "project_uuid": "string",    "server_uuid": "string",    "environment_name": "string",    "environment_uuid": "string",    "dockerfile": "string"  }'
{  "uuid": "string"}
{  "message": "Invalid token."}
{  "message": "Unauthenticated."}
{  "message": "Domain conflicts detected. Use force_domain_override=true to proceed.",  "warning": "Using the same domain for multiple resources can cause routing conflicts and unpredictable behavior.",  "conflicts": [    {      "domain": "example.com",      "resource_name": "My Application",      "resource_uuid": "abc123-def456",      "resource_type": "application",      "message": "Domain example.com is already in use by application 'My Application'"    }  ]}