fix: root user seeder should be the last (why? no idea. we will figure it out)
version ++
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'coolify' => [
|
'coolify' => [
|
||||||
'version' => '4.0.0-beta.381',
|
'version' => '4.0.0-beta.382',
|
||||||
'self_hosted' => env('SELF_HOSTED', true),
|
'self_hosted' => env('SELF_HOSTED', true),
|
||||||
'autoupdate' => env('AUTOUPDATE'),
|
'autoupdate' => env('AUTOUPDATE'),
|
||||||
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
||||||
|
@@ -46,8 +46,6 @@ class ProductionSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->call(RootUserSeeder::class);
|
|
||||||
|
|
||||||
if (GithubApp::find(0) == null) {
|
if (GithubApp::find(0) == null) {
|
||||||
GithubApp::create([
|
GithubApp::create([
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
@@ -190,5 +188,6 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
|
|||||||
$this->call(OauthSettingSeeder::class);
|
$this->call(OauthSettingSeeder::class);
|
||||||
$this->call(PopulateSshKeysDirectorySeeder::class);
|
$this->call(PopulateSshKeysDirectorySeeder::class);
|
||||||
$this->call(SentinelSeeder::class);
|
$this->call(SentinelSeeder::class);
|
||||||
|
$this->call(RootUserSeeder::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@ set -e # Exit immediately if a command exits with a non-zero status
|
|||||||
## $1 could be empty, so we need to disable this check
|
## $1 could be empty, so we need to disable this check
|
||||||
#set -u # Treat unset variables as an error and exit
|
#set -u # Treat unset variables as an error and exit
|
||||||
set -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status
|
set -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status
|
||||||
CDN="https://cdn.coollabs.io/coolify-nightly"
|
CDN="https://cdn.coollabs.io/coolify"
|
||||||
DATE=$(date +"%Y%m%d-%H%M%S")
|
DATE=$(date +"%Y%m%d-%H%M%S")
|
||||||
|
|
||||||
VERSION="1.6"
|
VERSION="1.6"
|
||||||
@@ -22,6 +22,11 @@ echo -e "Welcome to Coolify Installer!"
|
|||||||
echo -e "This script will install everything for you. Sit back and relax."
|
echo -e "This script will install everything for you. Sit back and relax."
|
||||||
echo -e "Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh\n"
|
echo -e "Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh\n"
|
||||||
|
|
||||||
|
# Predefined root user
|
||||||
|
ROOT_USERNAME=${ROOT_USERNAME:-}
|
||||||
|
ROOT_USER_EMAIL=${ROOT_USER_EMAIL:-}
|
||||||
|
ROOT_USER_PASSWORD=${ROOT_USER_PASSWORD:-}
|
||||||
|
|
||||||
TOTAL_SPACE=$(df -BG / | awk 'NR==2 {print $2}' | sed 's/G//')
|
TOTAL_SPACE=$(df -BG / | awk 'NR==2 {print $2}' | sed 's/G//')
|
||||||
AVAILABLE_SPACE=$(df -BG / | awk 'NR==2 {print $4}' | sed 's/G//')
|
AVAILABLE_SPACE=$(df -BG / | awk 'NR==2 {print $4}' | sed 's/G//')
|
||||||
REQUIRED_TOTAL_SPACE=30
|
REQUIRED_TOTAL_SPACE=30
|
||||||
@@ -481,6 +486,19 @@ else
|
|||||||
sed -i "s|^PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|" "$ENV_FILE-$DATE"
|
sed -i "s|^PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|" "$ENV_FILE-$DATE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add default root user credentials from environment variables
|
||||||
|
if [ -n "$ROOT_USERNAME" ] && [ -n "$ROOT_USER_EMAIL" ] && [ -n "$ROOT_USER_PASSWORD" ]; then
|
||||||
|
if ! grep -q "^ROOT_USERNAME=" "$ENV_FILE-$DATE"; then
|
||||||
|
sed -i "s|^ROOT_USERNAME=.*|ROOT_USERNAME=$ROOT_USERNAME|" "$ENV_FILE-$DATE"
|
||||||
|
fi
|
||||||
|
if ! grep -q "^ROOT_USER_EMAIL=" "$ENV_FILE-$DATE"; then
|
||||||
|
sed -i "s|^ROOT_USER_EMAIL=.*|ROOT_USER_EMAIL=$ROOT_USER_EMAIL|" "$ENV_FILE-$DATE"
|
||||||
|
fi
|
||||||
|
if ! grep -q "^ROOT_USER_PASSWORD=" "$ENV_FILE-$DATE"; then
|
||||||
|
sed -i "s|^ROOT_USER_PASSWORD=.*|ROOT_USER_PASSWORD=$ROOT_USER_PASSWORD|" "$ENV_FILE-$DATE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Merge .env and .env.production. New values will be added to .env
|
# Merge .env and .env.production. New values will be added to .env
|
||||||
echo -e "7. Propagating .env with new values - if necessary."
|
echo -e "7. Propagating .env with new values - if necessary."
|
||||||
awk -F '=' '!seen[$1]++' "$ENV_FILE-$DATE" /data/coolify/source/.env.production > $ENV_FILE
|
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:
|
|||||||
|
|
||||||
set +e
|
set +e
|
||||||
DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
||||||
PRIVATE_IPS=$(hostname -I)
|
PRIVATE_IPS=$(hostname -I 2>/dev/null || ip -o addr show scope global | awk '{print $4}' | cut -d/ -f1)
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -n "$PRIVATE_IPS" ]; then
|
if [ -n "$PRIVATE_IPS" ]; then
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.378"
|
"version": "4.0.0-beta.382"
|
||||||
},
|
},
|
||||||
"nightly": {
|
"nightly": {
|
||||||
"version": "4.0.0-beta.379"
|
"version": "4.0.0-beta.383"
|
||||||
},
|
},
|
||||||
"helper": {
|
"helper": {
|
||||||
"version": "1.0.4"
|
"version": "1.0.4"
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.381"
|
"version": "4.0.0-beta.382"
|
||||||
},
|
},
|
||||||
"nightly": {
|
"nightly": {
|
||||||
"version": "4.0.0-beta.382"
|
"version": "4.0.0-beta.383"
|
||||||
},
|
},
|
||||||
"helper": {
|
"helper": {
|
||||||
"version": "1.0.4"
|
"version": "1.0.4"
|
||||||
|
Reference in New Issue
Block a user