Skip to content

Commit d19b0ea

Browse files
authored
Merge pull request #4188 from coollabsio/next
v4.0.0-beta.363
2 parents c70950e + 373e715 commit d19b0ea

File tree

12 files changed

+71
-22
lines changed

12 files changed

+71
-22
lines changed

app/Livewire/Notifications/Email.php

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ public function instantSaveResend()
187187
{
188188
try {
189189
$this->validate([
190+
'resendApiKey' => 'required',
190191
], [
191192
'resendApiKey.required' => 'Resend API Key is required.',
192193
]);

app/Livewire/Server/CloudflareTunnels.php

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function mount(string $server_uuid)
1717
{
1818
try {
1919
$this->server = Server::ownedByCurrentTeam()->whereUuid($server_uuid)->firstOrFail();
20+
if ($this->server->isLocalhost()) {
21+
return redirect()->route('server.show', ['server_uuid' => $server_uuid]);
22+
}
2023
$this->isCloudflareTunnelsEnabled = $this->server->settings->is_cloudflare_tunnel;
2124
} catch (\Throwable $e) {
2225
return handleError($e, $this);

app/Livewire/Server/Show.php

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public function syncData(bool $toModel = false)
116116
$this->server->save();
117117

118118
$this->server->settings->is_swarm_manager = $this->isSwarmManager;
119+
$this->server->settings->wildcard_domain = $this->wildcardDomain;
119120
$this->server->settings->is_swarm_worker = $this->isSwarmWorker;
120121
$this->server->settings->is_build_server = $this->isBuildServer;
121122
$this->server->settings->is_metrics_enabled = $this->isMetricsEnabled;
@@ -134,6 +135,7 @@ public function syncData(bool $toModel = false)
134135
$this->ip = $this->server->ip;
135136
$this->user = $this->server->user;
136137
$this->port = $this->server->port;
138+
137139
$this->wildcardDomain = $this->server->settings->wildcard_domain;
138140
$this->isReachable = $this->server->settings->is_reachable;
139141
$this->isUsable = $this->server->settings->is_usable;

config/sentry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// The release version of your application
99
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
10-
'release' => '4.0.0-beta.362',
10+
'release' => '4.0.0-beta.363',
1111

1212
// When left empty or `null` the Laravel environment will be used
1313
'environment' => config('app.env'),

config/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
return '4.0.0-beta.362';
3+
return '4.0.0-beta.363';

other/nightly/install.sh

+45-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e # Exit immediately if a command exits with a non-zero status
55
## $1 could be empty, so we need to disable this check
66
#set -u # Treat unset variables as an error and exit
77
set -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status
8-
CDN="https://cdn.coollabs.io/coolify"
8+
CDN="https://cdn.coollabs.io/coolify-nightly"
99
DATE=$(date +"%Y%m%d-%H%M%S")
1010

1111
VERSION="1.6"
@@ -185,11 +185,51 @@ elif [ -x "$(command -v service)" ]; then
185185
SSH_DETECTED=true
186186
fi
187187
fi
188+
189+
188190
if [ "$SSH_DETECTED" = "false" ]; then
189-
echo "###############################################################################"
190-
echo "WARNING: Could not detect if OpenSSH server is installed and running - this does not mean that it is not installed, just that we could not detect it."
191-
echo -e "Please make sure it is set, otherwise Coolify cannot connect to the host system. \n"
192-
echo "###############################################################################"
191+
echo " - OpenSSH server not detected. Installing OpenSSH server."
192+
case "$OS_TYPE" in
193+
arch)
194+
pacman -Sy --noconfirm openssh >/dev/null
195+
systemctl enable sshd >/dev/null 2>&1
196+
systemctl start sshd >/dev/null 2>&1
197+
;;
198+
alpine)
199+
apk add openssh >/dev/null
200+
rc-update add sshd default >/dev/null 2>&1
201+
service sshd start >/dev/null 2>&1
202+
;;
203+
ubuntu | debian | raspbian)
204+
apt-get update -y >/dev/null
205+
apt-get install -y openssh-server >/dev/null
206+
systemctl enable ssh >/dev/null 2>&1
207+
systemctl start ssh >/dev/null 2>&1
208+
;;
209+
centos | fedora | rhel | ol | rocky | almalinux | amzn)
210+
if [ "$OS_TYPE" = "amzn" ]; then
211+
dnf install -y openssh-server >/dev/null
212+
else
213+
dnf install -y openssh-server >/dev/null
214+
fi
215+
systemctl enable sshd >/dev/null 2>&1
216+
systemctl start sshd >/dev/null 2>&1
217+
;;
218+
sles | opensuse-leap | opensuse-tumbleweed)
219+
zypper install -y openssh >/dev/null
220+
systemctl enable sshd >/dev/null 2>&1
221+
systemctl start sshd >/dev/null 2>&1
222+
;;
223+
*)
224+
echo "###############################################################################"
225+
echo "WARNING: Could not detect and install OpenSSH server - this does not mean that it is not installed or not running, just that we could not detect it."
226+
echo -e "Please make sure it is installed and running, otherwise Coolify cannot connect to the host system. \n"
227+
echo "###############################################################################"
228+
exit 1
229+
;;
230+
esac
231+
echo " - OpenSSH server installed successfully."
232+
SSH_DETECTED=true
193233
fi
194234

195235
# Detect SSH PermitRootLogin

other/nightly/upgrade.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22
## Do not modify this file. You will lose the ability to autoupdate!
33

4-
VERSION="1.1"
4+
VERSION="1.2"
55
CDN="https://cdn.coollabs.io/coolify-nightly"
66
LATEST_IMAGE=${1:-latest}
77
LATEST_HELPER_VERSION=${2:-latest}
8+
DATE=$(date +%Y-%m-%d-%H-%M-%S)
89

910
curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.yml
1011
curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml
@@ -32,7 +33,7 @@ docker network create --attachable coolify 2>/dev/null
3233

3334
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
3435
echo "docker-compose.custom.yml detected."
35-
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml -f /data/coolify/source/docker-compose.custom.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60"
36+
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml -f /data/coolify/source/docker-compose.custom.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60" > /data/coolify/source/upgrade-${DATE}.log 2>&1
3637
else
37-
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60"
38+
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60" > /data/coolify/source/upgrade-${DATE}.log 2>&1
3839
fi

other/nightly/versions.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"coolify": {
33
"v4": {
4-
"version": "4.0.0-beta.362"
4+
"version": "4.0.0-beta.363"
55
},
66
"nightly": {
7-
"version": "4.0.0-beta.363"
7+
"version": "4.0.0-beta.364"
88
},
99
"helper": {
1010
"version": "1.0.3"

resources/views/components/server/sidebar.blade.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">Private Key
1111
</a>
1212
@if ($server->isFunctional())
13-
<a class="menu-item {{ $activeMenu === 'cloudflare-tunnels' ? 'menu-item-active' : '' }}"
14-
href="{{ route('server.cloudflare-tunnels', ['server_uuid' => $server->uuid]) }}">Cloudflare
15-
Tunnels</a>
13+
@if (!$server->isLocalhost())
14+
<a class="menu-item {{ $activeMenu === 'cloudflare-tunnels' ? 'menu-item-active' : '' }}"
15+
href="{{ route('server.cloudflare-tunnels', ['server_uuid' => $server->uuid]) }}">Cloudflare
16+
Tunnels</a>
17+
@endif
1618
<a class="menu-item {{ $activeMenu === 'destinations' ? 'menu-item-active' : '' }}"
1719
href="{{ route('server.destinations', ['server_uuid' => $server->uuid]) }}">Destinations
1820
</a>

resources/views/livewire/server/cloudflare-tunnels.blade.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
<x-helper class="inline-flex"
1313
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>" />
1414
</div>
15-
<div>Secure your servers with Cloudflare Tunnels</div>
16-
15+
<div>Secure your servers with Cloudflare Tunnels.</div>
1716
</div>
1817
<div class="flex flex-col gap-2 pt-6">
1918
@if ($isCloudflareTunnelsEnabled)

scripts/upgrade.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22
## Do not modify this file. You will lose the ability to autoupdate!
33

4-
VERSION="1.1"
4+
VERSION="1.2"
55
CDN="https://cdn.coollabs.io/coolify"
66
LATEST_IMAGE=${1:-latest}
77
LATEST_HELPER_VERSION=${2:-latest}
8+
DATE=$(date +%Y-%m-%d-%H-%M-%S)
89

910
curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.yml
1011
curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml
@@ -32,7 +33,7 @@ docker network create --attachable coolify 2>/dev/null
3233

3334
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
3435
echo "docker-compose.custom.yml detected."
35-
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml -f /data/coolify/source/docker-compose.custom.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60"
36+
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml -f /data/coolify/source/docker-compose.custom.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60" > /data/coolify/source/upgrade-${DATE}.log 2>&1
3637
else
37-
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60"
38+
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION:-latest} bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --remove-orphans --force-recreate --wait --wait-timeout 60" > /data/coolify/source/upgrade-${DATE}.log 2>&1
3839
fi

versions.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"coolify": {
33
"v4": {
4-
"version": "4.0.0-beta.362"
4+
"version": "4.0.0-beta.363"
55
},
66
"nightly": {
7-
"version": "4.0.0-beta.363"
7+
"version": "4.0.0-beta.364"
88
},
99
"helper": {
1010
"version": "1.0.3"

0 commit comments

Comments
 (0)