Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

updates

Andras Bacsai2ae67b8ca973
diff --git a/.env.development.example b/.env.development.example
index a0cbac857b..24f8200b58 100644
--- a/.env.development.example
+++ b/.env.development.example
@@ -1,3 +1,4 @@
+SELF_HOSTED=true
############################################################################################################
# Development Environment
@@ -18,7 +19,6 @@ APP_SERVICE=php
APP_ENV=local
APP_KEY=
APP_DEBUG=true
-APP_URL=http://localhost
APP_PORT=8000
MAIL_MAILER=smtp
diff --git a/.env.production b/.env.production
index c43d5552d8..1582d7b384 100644
--- a/.env.production
+++ b/.env.production
@@ -1,5 +1,4 @@
-COOLIFY_DEFAULT_PROXY=traefik
-COOLIFY_DEFAULT_NETWORK=coolify
+SELF_HOSTED=true
SENTRY_LARAVEL_DSN=https://[email protected]/4504672605372416
SENTRY_TRACES_SAMPLE_RATE=0.2
@@ -9,8 +8,7 @@ APP_SERVICE=php
APP_ENV=production
APP_KEY=
APP_DEBUG=false
-APP_URL=http://localhost
-APP_PORT=3000
+APP_PORT=8000
SESSION_DRIVER=database
diff --git a/config/coolify.php b/config/coolify.php
index 0afb921dc9..4e25c87457 100644
--- a/config/coolify.php
+++ b/config/coolify.php
@@ -1,6 +1,7 @@
<?php
return [
+ 'self_hosted' => env('SELF_HOSTED', true),
'mux_enabled' => env('MUX_ENABLED', true),
'dev_webhook' => env('SERVEO_URL'),
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php
index 253a4ba300..3c66a7dc1a 100644
--- a/database/seeders/ProductionSeeder.php
+++ b/database/seeders/ProductionSeeder.php
@@ -89,12 +89,10 @@ class ProductionSeeder extends Seeder
'team_id' => 0,
'private_key_id' => 0
];
- if (env('COOLIFY_DEFAULT_PROXY') == 'traefik') {
- $server_details['extra_attributes'] = ServerMetadata::from([
- 'proxy_type' => ProxyTypes::TRAEFIK_V2->value,
- 'proxy_status' => ProxyStatus::EXITED->value
- ]);
- }
+ $server_details['extra_attributes'] = ServerMetadata::from([
+ 'proxy_type' => ProxyTypes::TRAEFIK_V2->value,
+ 'proxy_status' => ProxyStatus::EXITED->value
+ ]);
$server = Server::create($server_details);
$server->settings->is_validated = true;
$server->settings->save();
diff --git a/scripts/install.sh b/scripts/install.sh
index 89660917c5..fcc18e3504 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -39,6 +39,7 @@ curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.p
curl -fsSL $CDN/.env.production -o /data/coolify/source/.env.production
curl -fsSL $CDN/upgrade.sh -o /data/coolify/source/upgrade.sh
+
# Copy .env.example if .env does not exist
if [ ! -f /data/coolify/source/.env ]; then
cp /data/coolify/source/.env.production /data/coolify/source/.env
@@ -47,6 +48,9 @@ if [ ! -f /data/coolify/source/.env ]; then
sed -i "s|REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env
fi
+# Merge .env and .env.production. New values will be added to .env
+sort -u -t '=' -k 1,1 /data/coolify/source/.env.production /data/coolify/source/.env | sed '/^$/d' > /data/coolify/source/.env
+
# Generate an ssh key (ed25519) at /data/coolify/ssh/keys/[email protected]
if [ ! -f /data/coolify/ssh/keys/[email protected] ]; then
ssh-keygen -t ed25519 -f /data/coolify/ssh/keys/[email protected] -q -N "" -C root@coolify