@@ -117,65 +117,61 @@ class="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-coolgray-300 tex
117
117
</div >
118
118
</div >
119
119
</div >
120
- <div class =" w-64" >
121
- @if ($server -> isFunctional () )
122
- @if (! $server -> isLocalhost () )
123
- <x-forms .checkbox instantSave id =" server.settings.is_build_server"
124
- label =" Use it as a build server?" />
125
- <div class =" flex items-center gap-1 pt-6" >
126
- <h3 class =" " >Cloudflare Tunnels
127
- </h3 >
120
+ <div class =" w-96" >
121
+ @if (! $server -> isLocalhost () )
122
+ <x-forms .checkbox instantSave id =" server.settings.is_build_server"
123
+ label =" Use it as a build server?" />
124
+ <div class =" flex flex-col gap-2 pt-6" >
125
+ <div class =" flex items-center gap-1" >
126
+ <h3 class =" text-lg font-semibold" >Cloudflare Tunnels</h3 >
128
127
<x-helper class =" inline-flex"
129
- helper =" If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.<br>< span class='dark:text-warning'>Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
128
+ helper =" If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.<br> You then can close your server's SSH port in the firewall of your hosting provider.<br>< span class='dark:text-warning'>If you choose manual configuration, Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
130
129
</div >
131
130
@if ($server -> settings -> is_cloudflare_tunnel )
132
131
<x-forms .checkbox instantSave id =" server.settings.is_cloudflare_tunnel" label =" Enabled" />
133
- @else
134
- <x-modal-input buttonTitle =" Configure" title =" Cloudflare Tunnels" >
132
+ @elseif (! $server -> isFunctional () )
133
+ <div class =" p-4 mb-4 text-sm text-yellow-800 bg-yellow-100 rounded-lg dark:bg-yellow-900 dark:text-yellow-300" >
134
+ <p >Please validate the server first. The SSH port needs to be open in the firewall on your hosting provider that coolify can validate the server and automatically configure cloudflare tunnels.</p >
135
+ <p class =" mt-2" >For more information, please read our <a href =" https://coolify.io/docs/knowledge-base/cloudflare/tunnels/" target =" _blank" class =" font-medium underline hover:text-yellow-600 dark:hover:text-yellow-200" >Documentation</a >.</p >
136
+ </div >
137
+ @endif
138
+ @if (! $server -> settings -> is_cloudflare_tunnel && $server -> isFunctional () )
139
+ <x-modal-input buttonTitle =" Automatic Configuration" title =" Cloudflare Tunnels" class =" w-full" >
135
140
<livewire:server .configure-cloudflare-tunnels :server_id =" $server->id" />
136
141
</x-modal-input >
137
142
@endif
138
- @if (! $server -> isBuildServer () )
139
- <h3 class =" pt-6" >Swarm <span class =" text-xs text-neutral-500" >(experimental)</span ></h3 >
140
- <div class =" pb-4" >Read the docs <a class =' underline dark:text-white'
141
- href =' https://coolify.io/docs/knowledge-base/docker/swarm' target =' _blank' >here</a >.
142
- </div >
143
- @if ($server -> settings -> is_swarm_worker )
144
- <x-forms .checkbox disabled instantSave type =" checkbox"
145
- id =" server.settings.is_swarm_manager"
146
- helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
147
- label =" Is it a Swarm Manager?" />
148
- @else
149
- <x-forms .checkbox instantSave type =" checkbox" id =" server.settings.is_swarm_manager"
150
- helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
151
- label =" Is it a Swarm Manager?" />
152
- @endif
153
-
154
- @if ($server -> settings -> is_swarm_manager )
155
- <x-forms .checkbox disabled instantSave type =" checkbox"
156
- id =" server.settings.is_swarm_worker"
157
- helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
158
- label =" Is it a Swarm Worker?" />
159
- @else
160
- <x-forms .checkbox instantSave type =" checkbox" id =" server.settings.is_swarm_worker"
161
- helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
162
- label =" Is it a Swarm Worker?" />
163
- @endif
143
+ @if (! $server -> settings -> is_cloudflare_tunnel )
144
+ <x-forms .button wire:click =" manualCloudflareConfig" class =" w-full" >
145
+ I have configured Cloudflare Tunnels manually
146
+ </x-forms .button >
164
147
@endif
165
- @endif
166
- @else
167
- <div class =" flex items-center gap-1 pt-6" >
168
- <h3 class =" " >Cloudflare Tunnels
169
- </h3 >
170
- <x-helper class =" inline-flex"
171
- helper =" If you are using Cloudflare Tunnels, enable this. It will proxy all SSH requests to your server through Cloudflare.<br><span class='dark:text-warning'>Coolify does not install or set up Cloudflare (cloudflared) on your server.</span>" />
172
148
</div >
173
- @if ($server -> settings -> is_cloudflare_tunnel )
174
- <x-forms .checkbox instantSave id =" server.settings.is_cloudflare_tunnel" label =" Enabled" />
175
- @else
176
- <x-modal-input buttonTitle =" Configure" title =" Cloudflare Tunnels" >
177
- <livewire:server .configure-cloudflare-tunnels :server_id =" $server->id" />
178
- </x-modal-input >
149
+ @if (! $server -> isBuildServer () )
150
+ <h3 class =" pt-6" >Swarm <span class =" text-xs text-neutral-500" >(experimental)</span ></h3 >
151
+ <div class =" pb-4" >Read the docs <a class =' underline dark:text-white'
152
+ href =' https://coolify.io/docs/knowledge-base/docker/swarm' target =' _blank' >here</a >.
153
+ </div >
154
+ @if ($server -> settings -> is_swarm_worker )
155
+ <x-forms .checkbox disabled instantSave type =" checkbox"
156
+ id =" server.settings.is_swarm_manager"
157
+ helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
158
+ label =" Is it a Swarm Manager?" />
159
+ @else
160
+ <x-forms .checkbox instantSave type =" checkbox" id =" server.settings.is_swarm_manager"
161
+ helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
162
+ label =" Is it a Swarm Manager?" />
163
+ @endif
164
+
165
+ @if ($server -> settings -> is_swarm_manager )
166
+ <x-forms .checkbox disabled instantSave type =" checkbox"
167
+ id =" server.settings.is_swarm_worker"
168
+ helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
169
+ label =" Is it a Swarm Worker?" />
170
+ @else
171
+ <x-forms .checkbox instantSave type =" checkbox" id =" server.settings.is_swarm_worker"
172
+ helper =" For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."
173
+ label =" Is it a Swarm Worker?" />
174
+ @endif
179
175
@endif
180
176
@endif
181
177
</div >
0 commit comments