2023-11-20 10:35:31 +00:00
< div >
2026-08-03 21:11:54 +00:00
@ php
$canUpdate = auth () -> user () -> can ( 'update' , $application );
$labelsManagedByCoolify = $application -> settings -> is_container_label_readonly_enabled ;
2026-08-05 11:50:11 +00:00
// Use model UUIDs: Livewire update requests do not carry page route params.
2026-08-03 21:11:54 +00:00
$generalRouteParameters = [
2026-08-05 11:50:11 +00:00
'project_uuid' => data_get ( $application , 'environment.project.uuid' ),
'environment_uuid' => data_get ( $application , 'environment.uuid' ),
'application_uuid' => $application -> uuid ,
2026-08-03 21:11:54 +00:00
];
@ endphp
2026-03-28 13:55:50 +00:00
2026-08-03 21:11:54 +00:00
< div class = " flex flex-col gap-6 " >
< x - application . settings - section id = " advanced-build-section " title = " Build "
helper = " Fine-tune how images are built for this application. " >
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " disableBuildCache " label = " Build cache " onChange = " instantSave "
helper = " Disabling the cache forces a completely fresh Docker build on every deployment. "
: options = " [
[ 'value' => false , 'label' => 'Use Docker build cache' ],
[ 'value' => true , 'label' => 'Rebuild from scratch every time' ],
] " :disabled= " ! $canUpdate " />
< x - forms . listbox id = " injectBuildArgsToDockerfile " label = " Build arguments " onChange = " instantSave "
2026-06-20 00:23:12 +00:00
helper = " When injected automatically, MapleDeploy adds ARG statements to your Dockerfile for build-time variables. Manage them manually to preserve Docker build cache. "
2026-08-03 21:11:54 +00:00
: options = " [
[ 'value' => true , 'label' => 'Inject build args automatically' ],
[ 'value' => false , 'label' => 'Managed manually in Dockerfile' ],
] " :disabled= " ! $canUpdate " />
< x - forms . listbox id = " includeSourceCommitInBuild " label = " Source commit availability " onChange = " instantSave "
helper = " SOURCE_COMMIT (git commit hash) is always available at runtime. Making it available during build invalidates the cache on every commit. "
: options = " [
[ 'value' => false , 'label' => 'Runtime only (preserves cache)' ],
[ 'value' => true , 'label' => 'Available during build' ],
] " :disabled= " ! $canUpdate " />
</ div >
</ x - application . settings - section >
< x - application . settings - section id = " advanced-container-section " title = " Container "
helper = " Control how the deployed container is named. " >
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isConsistentContainerNameEnabled " label = " Container naming " onChange = " instantSave "
helper = " With a consistent name the container is always called { { $application->uuid }}. <span class='font-bold dark:text-warning'>You will lose the rolling update feature!</span> "
: options = " [
[ 'value' => false , 'label' => 'Generated name (rolling updates)' ],
[ 'value' => true , 'label' => 'Consistent name (no rolling updates)' ],
] " :disabled= " ! $canUpdate " />
2026-08-05 11:50:11 +00:00
@ if ( $isConsistentContainerNameEnabled === true )
2026-03-28 13:55:50 +00:00
< x - forms . input
2026-08-03 21:11:54 +00:00
helper = " You can add a custom name for your container.<br><br>The name is saved automatically and converted to slug format. <span class='font-bold dark:text-warning'>You will lose the rolling update feature!</span> "
id = " customInternalName " label = " Custom container name " canGate = " update "
wire : change = " saveCustomName " : canResource = " $application " />
@ endif
</ div >
</ x - application . settings - section >
2026-03-28 13:55:50 +00:00
2026-08-03 21:11:54 +00:00
@ if ( $application -> git_based ())
< x - application . settings - section id = " advanced-deployment-section " title = " Deployment "
2026-09-07 16:29:58 +00:00
helper = " Automatic deployments from Git webhooks. " >
2026-08-03 21:11:54 +00:00
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isAutoDeployEnabled " label = " Auto deploy " onChange = " instantSave "
helper = " Automatically deploy new commits based on Git webhooks. "
: options = " [
[ 'value' => true , 'label' => 'Deploy on push (webhooks)' ],
[ 'value' => false , 'label' => 'Manual deployments only' ],
] " :disabled= " ! $canUpdate " />
</ div >
</ x - application . settings - section >
2026-03-28 13:55:50 +00:00
2026-08-03 21:11:54 +00:00
< x - application . settings - section id = " advanced-git-section " title = " Git "
helper = " Options applied while cloning the repository during builds. " >
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isGitSubmodulesEnabled " label = " Submodules " onChange = " instantSave "
helper = " Allow Git submodules during the build process. "
: options = " [
[ 'value' => true , 'label' => 'Clone submodules' ],
[ 'value' => false , 'label' => 'Skip submodules' ],
] " :disabled= " ! $canUpdate " />
< x - forms . listbox id = " isGitLfsEnabled " label = " Git LFS " onChange = " instantSave "
helper = " Allow Git LFS during the build process. "
: options = " [
[ 'value' => true , 'label' => 'Enabled' ],
[ 'value' => false , 'label' => 'Disabled' ],
] " :disabled= " ! $canUpdate " />
< x - forms . listbox id = " isGitShallowCloneEnabled " label = " Clone depth " onChange = " instantSave "
helper = " Shallow cloning (--depth=1) speeds up deployments by only fetching the latest commit, useful for large repositories. "
: options = " [
[ 'value' => false , 'label' => 'Full history' ],
[ 'value' => true , 'label' => 'Shallow clone (latest commit only)' ],
] " :disabled= " ! $canUpdate " />
</ div >
</ x - application . settings - section >
@ endif
@ if ( $application -> build_pack === 'dockercompose' )
< x - application . settings - section id = " advanced-compose-section " title = " Docker compose "
helper = " Advanced behavior for compose-based deployments. " >
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isRawComposeDeploymentEnabled " label = " Compose deployment " onChange = " instantSave "
2026-06-20 00:23:12 +00:00
helper = " WARNING: Advanced use cases only. In raw mode your compose file is deployed as-is. Nothing is modified by MapleDeploy and you need to configure the proxy parts. More info in the <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/compose#raw-docker-compose-deployment'>documentation</a>. "
2026-08-03 21:11:54 +00:00
: options = " [
2026-06-20 00:23:12 +00:00
[ 'value' => false , 'label' => 'Managed by MapleDeploy' ],
2026-08-03 21:11:54 +00:00
[ 'value' => true , 'label' => 'Raw (deploy file as-is)' ],
] " :disabled= " ! $canUpdate " />
< x - forms . listbox id = " isConnectToDockerNetworkEnabled " label = " Predefined network " onChange = " instantSave "
2026-06-20 00:23:12 +00:00
helper = " By default a compose resource only gets its own internal network. Connecting to a MapleDeploy predefined network may require different internal DNS names. More info <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/compose#connect-to-predefined-networks'>here</a>. "
2026-08-03 21:11:54 +00:00
: options = " [
[ 'value' => false , 'label' => 'Isolated network only' ],
[ 'value' => true , 'label' => 'Connect to predefined network' ],
] " :disabled= " ! $canUpdate " />
</ div >
</ x - application . settings - section >
@ endif
< x - application . settings - section id = " advanced-proxy-section " title = " Proxy "
helper = " How the proxy serves traffic for this application. " >
@ if ( $labelsManagedByCoolify )
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isGzipEnabled " label = " Gzip compression " onChange = " instantSave "
helper = " Some services compress data by default. In that case you do not need this. "
: options = " [
[ 'value' => true , 'label' => 'Enabled' ],
[ 'value' => false , 'label' => 'Disabled' ],
] " :disabled= " ! $canUpdate " />
< x - forms . listbox id = " isStripprefixEnabled " label = " Path prefixes " onChange = " instantSave "
helper = " Strip Prefix removes prefixes from paths, like /api/ to /. "
: options = " [
[ 'value' => true , 'label' => 'Strip prefixes' ],
[ 'value' => false , 'label' => 'Keep paths as-is' ],
] " :disabled= " ! $canUpdate " />
</ div >
@ else
< x - empty size = " sm " title = " Proxy behavior is managed through labels "
2026-06-20 00:23:12 +00:00
description = " Container labels are managed manually for this application. Switch label management back to MapleDeploy to configure the proxy here. "
2026-08-03 21:11:54 +00:00
icon - name = " globe " >
< x - slot : contents >
< a class = " button "
href = " { { route('project.application.configuration', $generalRouteParameters ) }}#container-labels-section "
{{ wireNavigate () }} >
Go to Container labels
</ a >
</ x - slot : contents >
</ x - empty >
2024-01-16 14:19:14 +00:00
@ endif
2026-08-03 21:11:54 +00:00
</ x - application . settings - section >
2025-01-28 12:40:56 +00:00
2026-08-03 21:11:54 +00:00
< x - application . settings - section id = " advanced-operations-section " title = " Operations "
helper = " Shutdown and restart behavior for this application's containers. " >
< div class = " grid w-full gap-4 lg:grid-cols-2 " >
< x - forms . input type = " number " id = " stopGracePeriod " label = " Stop grace period (seconds) "
placeholder = " { { DEFAULT_STOP_GRACE_PERIOD_SECONDS }} " wire : change = " saveStopGracePeriod "
helper = " How long to wait for graceful shutdown during rolling updates, manual stops, and restarts. Applies to all containers for this application. Saved automatically. Default: { { DEFAULT_STOP_GRACE_PERIOD_SECONDS }} seconds. Range: { { MIN_STOP_GRACE_PERIOD_SECONDS }}- { { MAX_STOP_GRACE_PERIOD_SECONDS }} seconds (1 hour). "
min = " { { MIN_STOP_GRACE_PERIOD_SECONDS }} " max = " { { MAX_STOP_GRACE_PERIOD_SECONDS }} "
2026-03-28 13:55:50 +00:00
canGate = " update " : canResource = " $application " />
2026-08-03 21:11:54 +00:00
< x - forms . input type = " number " min = " 0 " id = " maxRestartCount " label = " Max restart count "
wire : change = " saveMaxRestartCount "
2026-06-20 00:23:12 +00:00
helper = " Maximum number of crash restarts before MapleDeploy automatically stops the application and sends a notification. Saved automatically. Set to 0 to disable the limit. "
2026-03-28 13:55:50 +00:00
canGate = " update " : canResource = " $application " />
2026-08-03 21:11:54 +00:00
</ div >
</ x - application . settings - section >
2026-03-28 13:55:50 +00:00
2026-08-03 21:11:54 +00:00
< x - application . settings - section id = " advanced-logs-section " title = " Logs "
helper = " Forward container logs to an external endpoint. " >
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isLogDrainEnabled " label = " Log drain " onChange = " instantSave "
helper = " Drain logs to the log drain endpoint configured in your Server settings. "
: options = " [
[ 'value' => false , 'label' => 'Disabled' ],
[ 'value' => true , 'label' => 'Send logs to the log drain endpoint' ],
] " :disabled= " ! $canUpdate " />
</ div >
</ x - application . settings - section >
2024-11-05 11:28:33 +00:00
2024-03-19 14:37:16 +00:00
@ if ( $application -> build_pack !== 'dockercompose' )
2026-08-03 21:11:54 +00:00
< x - application . settings - section id = " advanced-gpu-section " title = " GPU "
helper = " Give this application access to the host's GPUs. More info <a href='https://docs.docker.com/compose/gpu-support/' class='underline dark:text-white' target='_blank'>here</a>. " >
< div class = " grid w-full gap-4 sm:grid-cols-2 " >
< x - forms . listbox id = " isGpuEnabled " label = " GPU access " onChange = " instantSave "
: options = " [
[ 'value' => false , 'label' => 'Disabled' ],
[ 'value' => true , 'label' => 'Enabled' ],
] " :disabled= " ! $canUpdate " />
</ div >
2024-11-05 11:28:33 +00:00
@ if ( $isGpuEnabled )
2026-08-03 21:11:54 +00:00
< form id = " gpu-settings-form " wire : submit = " submit "
class = " mt-5 flex w-full flex-col gap-4 border-t border-neutral-200 pt-5 dark:border-white/[0.07] " >
{{ -- Scope to GPU form fields ; sibling instantSave listboxes share this component . -- }}
< x - unsaved - bar action = " submit "
targets = " gpuDriver,gpuCount,gpuDeviceIds,gpuOptions " />
< div class = " grid gap-4 sm:grid-cols-2 " >
< x - forms . input label = " GPU driver " id = " gpuDriver " canGate = " update " : canResource = " $application " />
< x - forms . input label = " GPU count " placeholder = " Empty means use all GPUs " id = " gpuCount "
canGate = " update " : canResource = " $application " />
</ div >
< x - forms . input label = " GPU device ids " placeholder = " 0,2 "
helper = " Comma separated list of device ids. More info <a href='https://docs.docker.com/compose/gpu-support/#access-specific-devices' class='underline dark:text-white' target='_blank'>here</a>. "
id = " gpuDeviceIds " canGate = " update " : canResource = " $application " />
< x - forms . textarea rows = " 6 " label = " GPU options " id = " gpuOptions " canGate = " update "
: canResource = " $application " />
</ form >
2024-11-05 11:28:33 +00:00
@ endif
2026-08-03 21:11:54 +00:00
</ x - application . settings - section >
2024-03-19 14:37:16 +00:00
@ endif
2026-08-03 21:11:54 +00:00
</ div >
2023-11-20 10:35:31 +00:00
</ div >