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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: infra files
Andras Bacsai4169d727fdf9
diff --git a/.env.development.example b/.env.development.exampleindex 920c32d925..f9bcd361a0 100644--- a/.env.development.example+++ b/.env.development.example@@ -1,16 +1,31 @@-APP_NAME=Coolify-localhost-APP_ID=development+# Coolify ConfigurationAPP_ENV=local+APP_NAME="Coolify Development"+APP_ID=developmentAPP_KEY=-APP_DEBUG=trueAPP_URL=http://localhostAPP_PORT=8000+APP_DEBUG=trueMUX_ENABLED=false+# Enable Laravel Telescope for debugging+TELESCOPE_ENABLED=false++# Selenium Driver URL for DuskDUSK_DRIVER_URL=http://selenium:4444-## For Andras only-# To purge cache+# PostgreSQL Database Configuration+DB_DATABASE=coolify+DB_USERNAME=coolify+DB_PASSWORD=password+DB_HOST=host.docker.internal+DB_PORT=5432++#Set custom ray port+RAY_PORT=++# Special Keys for Andras+# For cache purgingBUNNY_API_KEY=-# To upload assets+# For asset uploadsBUNNY_STORAGE_API_KEY=diff --git a/.env.production b/.env.productionindex f15a8b0e99..099ec7c250 100644--- a/.env.production+++ b/.env.production@@ -1,10 +1,16 @@+# Coolify ConfigurationAPP_ID=APP_NAME=CoolifyAPP_KEY=+# PostgreSQL Database Configuration+DB_USERNAME=coolifyDB_PASSWORD=++# Redis ConfigurationREDIS_PASSWORD=+# Pusher ConfigurationPUSHER_APP_ID=PUSHER_APP_KEY=PUSHER_APP_SECRET=diff --git a/docker-compose.prod.yml b/docker-compose.prod.ymlindex b8156cab52..b26cd57467 100644--- a/docker-compose.prod.yml+++ b/docker-compose.prod.yml@@ -13,19 +13,18 @@ services:- /data/coolify/backups:/var/www/html/storage/app/backups- /data/coolify/webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenanceenvironment:- - PHP_MEMORY_LIMIT- - APP_ID- APP_ENV=production- - APP_DEBUG- APP_NAME+ - APP_ID- APP_KEY- APP_URL- - DB_CONNECTION- - DB_HOST- - DB_PORT+ - APP_DEBUG- DB_DATABASE- DB_USERNAME- DB_PASSWORD+ - DB_HOST+ - DB_PORT+ - DB_CONNECTION- QUEUE_CONNECTION- REDIS_HOST- REDIS_PASSWORD@@ -34,6 +33,7 @@ services:- HORIZON_BALANCE_MAX_SHIFT- HORIZON_BALANCE_COOLDOWN- SSL_MODE=off+ - PHP_MEMORY_LIMIT- PHP_PM_CONTROL=dynamic- PHP_PM_START_SERVERS=1- PHP_PM_MIN_SPARE_SERVERS=1@@ -83,21 +83,17 @@ services:condition: service_healthyredis:condition: service_healthy+ soketi:+ condition: service_healthypostgres:volumes:- coolify-db:/var/lib/postgresql/dataenvironment:- POSTGRES_USER: "${DB_USERNAME:-coolify}"+ POSTGRES_USER: "${DB_USERNAME}"POSTGRES_PASSWORD: "${DB_PASSWORD}"POSTGRES_DB: "${DB_DATABASE:-coolify}"healthcheck:- test:- [- "CMD-SHELL",- "pg_isready -U ${DB_USERNAME:-coolify}",- "-d",- "${DB_DATABASE:-coolify}"- ]+ test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-coolify}" ]interval: 5sretries: 10timeout: 2s@@ -130,3 +126,7 @@ volumes:name: coolify-dbcoolify-redis:name: coolify-redis++networks:+ coolify:+ external: truediff --git a/docker-compose.windows.yml b/docker-compose.windows.ymlindex af5ecc0f7d..a1ee1aeea8 100644--- a/docker-compose.windows.yml+++ b/docker-compose.windows.yml@@ -71,14 +71,14 @@ services:volumes:- coolify-db:/var/lib/postgresql/dataenvironment:- POSTGRES_USER: "${DB_USERNAME:-coolify}"+ POSTGRES_USER: "${DB_USERNAME}"POSTGRES_PASSWORD: "${DB_PASSWORD}"POSTGRES_DB: "${DB_DATABASE:-coolify}"healthcheck:test:["CMD-SHELL",- "pg_isready -U ${DB_USERNAME:-coolify}",+ "pg_isready -U ${DB_USERNAME}","-d","${DB_DATABASE:-coolify}"]diff --git a/docker-compose.yml b/docker-compose.ymlindex 8eed44f8cc..930c0a6b93 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -10,6 +10,7 @@ services:depends_on:- postgres- redis+ - soketipostgres:image: postgres:15-alpinecontainer_name: coolify-db@@ -32,4 +33,4 @@ networks:coolify:name: coolifydriver: bridge- external: true+ external: falsediff --git a/scripts/install.sh b/scripts/install.shindex 2aaaebaef1..01fdcbc410 100755--- a/scripts/install.sh+++ b/scripts/install.sh@@ -6,11 +6,12 @@ set -e # Exit immediately if a command exits with a non-zero status#set -u # Treat unset variables as an error and exitset -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status-VERSION="1.3.3"+VERSION="1.3.4"DOCKER_VERSION="26.0"-CDN="https://cdn.coollabs.io/coolify"+CDN="https://cdn.coollabs.io/coolify-nightly"OS_TYPE=$(grep -w "ID" /etc/os-release | cut -d "=" -f 2 | tr -d '"')+ENV_FILE="/data/coolify/source/.env"# Check if the OS is manjaro, if so, change it to archif [ "$OS_TYPE" = "manjaro" ] || [ "$OS_TYPE" = "manjaro-arm" ]; then@@ -69,7 +70,7 @@ fiecho -e "-------------"echo -e "Welcome to Coolify v4 beta installer!"echo -e "This script will install everything for you."-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"echo -e "-------------"echo "OS: $OS_TYPE $OS_VERSION"@@ -83,8 +84,8 @@ arch)pacman -Sy --noconfirm --needed curl wget git jq >/dev/null || true;;ubuntu | debian | raspbian)- apt update -y >/dev/null- apt install -y curl wget git jq >/dev/null+ apt-get update -y >/dev/null+ apt-get install -y curl wget git jq >/dev/null;;centos | fedora | rhel | ol | rocky | almalinux | amzn)if [ "$OS_TYPE" = "amzn" ]; then@@ -93,7 +94,10 @@ centos | fedora | rhel | ol | rocky | almalinux | amzn)if ! command -v dnf >/dev/null; thenyum install -y dnf >/dev/nullfi- dnf install -y curl wget git jq >/dev/null+ if ! command -v curl >/dev/null; then+ dnf install -y curl >/dev/null+ fi+ dnf install -y wget git jq >/dev/nullfi;;sles | opensuse-leap | opensuse-tumbleweed)@@ -285,15 +289,24 @@ curl -fsSL $CDN/.env.production -o /data/coolify/source/.env.productioncurl -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- sed -i "s|APP_ID=.*|APP_ID=$(openssl rand -hex 16)|g" /data/coolify/source/.env- sed -i "s|APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|g" /data/coolify/source/.env- sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env- sed -i "s|REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env- sed -i "s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env- sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env- sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env+if [ ! -f $ENV_FILE ]; then+ cp /data/coolify/source/.env.production $ENV_FILE+ # Generate a secure APP_ID and APP_KEY+ sed -i "s|^APP_ID=.*|APP_ID=$(openssl rand -hex 16)|" "$ENV_FILE"+ sed -i "s|^APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|" "$ENV_FILE"++ # Generate a secure Postgres DB username and password+ # Causes issues: database "random-user" does not exist+ # sed -i "s|^DB_USERNAME=.*|DB_USERNAME=$(openssl rand -hex 16)|" "$ENV_FILE"+ sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|" "$ENV_FILE"++ # Generate a secure Redis password+ sed -i "s|^REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|" "$ENV_FILE"++ # Generate secure Pusher credentials+ sed -i "s|^PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|" "$ENV_FILE"+ sed -i "s|^PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|" "$ENV_FILE"+ sed -i "s|^PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|" "$ENV_FILE"fi# Merge .env and .env.production. New values will be added to .env@@ -331,5 +344,8 @@ fibash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}"-echo -e "\nCongratulations! Your Coolify instance is ready to use.\n"+echo "Waiting for 20 seconds for Coolify to be ready..."++sleep 20echo "Please visit http://$(curl -4s https://ifconfig.io):8000 to get started."+echo -e "\nCongratulations! Your Coolify instance is ready to use.\n"diff --git a/scripts/upgrade.sh b/scripts/upgrade.shindex b02fe83923..775cd3f814 100644--- a/scripts/upgrade.sh+++ b/scripts/upgrade.sh@@ -1,8 +1,8 @@#!/bin/bash## Do not modify this file. You will lose the ability to autoupdate!-VERSION="1.0.5"-CDN="https://cdn.coollabs.io/coolify"+VERSION="1.0.6"+CDN="https://cdn.coollabs.io/coolify-nightly"curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.ymlcurl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml@@ -25,12 +25,13 @@ if grep -q "PUSHER_APP_SECRET=$" /data/coolify/source/.env; thenfi# Make sure coolify network exists+# It is created when starting Coolify with docker composedocker network create --attachable coolify 2>/dev/null# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/nullif [ -f /data/coolify/source/docker-compose.custom.yml ]; thenecho "docker-compose.custom.yml detected."- docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper 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"+ docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper 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"else- docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper 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"+ docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper 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"fi