Skip to content

Commit a7e0653

Browse files
authored
Merge pull request #4852 from coollabsio/next
v4.0.0-beta.382
2 parents 916f8e3 + 66a42f4 commit a7e0653

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

config/constants.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44
'coolify' => [
5-
'version' => '4.0.0-beta.381',
5+
'version' => '4.0.0-beta.382',
66
'self_hosted' => env('SELF_HOSTED', true),
77
'autoupdate' => env('AUTOUPDATE'),
88
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),

database/seeders/ProductionSeeder.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ public function run(): void
4646
]);
4747
}
4848

49-
$this->call(RootUserSeeder::class);
50-
5149
if (GithubApp::find(0) == null) {
5250
GithubApp::create([
5351
'id' => 0,
@@ -190,5 +188,6 @@ public function run(): void
190188
$this->call(OauthSettingSeeder::class);
191189
$this->call(PopulateSshKeysDirectorySeeder::class);
192190
$this->call(SentinelSeeder::class);
191+
$this->call(RootUserSeeder::class);
193192
}
194193
}

other/nightly/install.sh

+20-2
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-nightly"
8+
CDN="https://cdn.coollabs.io/coolify"
99
DATE=$(date +"%Y%m%d-%H%M%S")
1010

1111
VERSION="1.6"
@@ -22,6 +22,11 @@ echo -e "Welcome to Coolify Installer!"
2222
echo -e "This script will install everything for you. Sit back and relax."
2323
echo -e "Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh\n"
2424

25+
# Predefined root user
26+
ROOT_USERNAME=${ROOT_USERNAME:-}
27+
ROOT_USER_EMAIL=${ROOT_USER_EMAIL:-}
28+
ROOT_USER_PASSWORD=${ROOT_USER_PASSWORD:-}
29+
2530
TOTAL_SPACE=$(df -BG / | awk 'NR==2 {print $2}' | sed 's/G//')
2631
AVAILABLE_SPACE=$(df -BG / | awk 'NR==2 {print $4}' | sed 's/G//')
2732
REQUIRED_TOTAL_SPACE=30
@@ -481,6 +486,19 @@ else
481486
sed -i "s|^PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|" "$ENV_FILE-$DATE"
482487
fi
483488

489+
# Add default root user credentials from environment variables
490+
if [ -n "$ROOT_USERNAME" ] && [ -n "$ROOT_USER_EMAIL" ] && [ -n "$ROOT_USER_PASSWORD" ]; then
491+
if ! grep -q "^ROOT_USERNAME=" "$ENV_FILE-$DATE"; then
492+
sed -i "s|^ROOT_USERNAME=.*|ROOT_USERNAME=$ROOT_USERNAME|" "$ENV_FILE-$DATE"
493+
fi
494+
if ! grep -q "^ROOT_USER_EMAIL=" "$ENV_FILE-$DATE"; then
495+
sed -i "s|^ROOT_USER_EMAIL=.*|ROOT_USER_EMAIL=$ROOT_USER_EMAIL|" "$ENV_FILE-$DATE"
496+
fi
497+
if ! grep -q "^ROOT_USER_PASSWORD=" "$ENV_FILE-$DATE"; then
498+
sed -i "s|^ROOT_USER_PASSWORD=.*|ROOT_USER_PASSWORD=$ROOT_USER_PASSWORD|" "$ENV_FILE-$DATE"
499+
fi
500+
fi
501+
484502
# Merge .env and .env.production. New values will be added to .env
485503
echo -e "7. Propagating .env with new values - if necessary."
486504
awk -F '=' '!seen[$1]++' "$ENV_FILE-$DATE" /data/coolify/source/.env.production > $ENV_FILE
@@ -542,7 +560,7 @@ echo -e "You can access Coolify through your Public IP: http://$(curl -4s https:
542560

543561
set +e
544562
DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
545-
PRIVATE_IPS=$(hostname -I)
563+
PRIVATE_IPS=$(hostname -I 2>/dev/null || ip -o addr show scope global | awk '{print $4}' | cut -d/ -f1)
546564
set -e
547565

548566
if [ -n "$PRIVATE_IPS" ]; then

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.378"
4+
"version": "4.0.0-beta.382"
55
},
66
"nightly": {
7-
"version": "4.0.0-beta.379"
7+
"version": "4.0.0-beta.383"
88
},
99
"helper": {
1010
"version": "1.0.4"

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.381"
4+
"version": "4.0.0-beta.382"
55
},
66
"nightly": {
7-
"version": "4.0.0-beta.382"
7+
"version": "4.0.0-beta.383"
88
},
99
"helper": {
1010
"version": "1.0.4"

0 commit comments

Comments
 (0)