main: modify local install script

This commit is contained in:
Gary 2024-02-22 17:43:23 -08:00
parent 1aba61824d
commit 5206c7611c
2 changed files with 5 additions and 43 deletions

View File

@ -1,41 +1,3 @@
Install Docker: https://docs.docker.com/engine/install/ubuntu/
sudo mkdir /data/
sudo mkdir /data/coolify/{source,ssh,applications,databases,backups,services,proxy}
sudo mkdir /data/coolify/ssh/{keys,mux}
sudo mkdir /data/coolifu/proxy/dynamic
sudo ssh-keygen -f ssh/keys/id.root@host.docker.internal -t ed25519 -N '' -C root@coolify
Add your public SSH key to ~/.ssh/authorized_keys:
cat /data/lasthour/ssh/keys/id.root@host.docker.internal.pub >>~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
sudo cp lasthourcloud/docker-compose.yml /data/coolify/source/
sudo cp lasthourcloud/docker-compose.prod.yml /data/coolify/source/
sudo cp lasthourcloud/.env.production /data/coolify/source/.env
sudo cp lasthourcloud/scripts/upgrade.sh /data/coolify/source/
sudo cp -r lasthourcloud/public/ /data/public
sudo cp -r lasthourcloud/app/Notifications /data/coolify/notifications
sudo cp -r lasthourcloud/app/Models /data/coolify/notifications
sudo cp -r lasthourcloud/app/Livewire /data/coolify/livewire
sudo cp lasthourcloud/.coolify-logo /data/coolify/public/coolify
sudo cp lasthourcloud/tailwind.config.js /data/coolify/tailwind
sudo sed -i "s|APP_ID=._|APP_ID=$(openssl rand -hex 16)|g" /data/coolify/source/.env
sudo sed -i "s|APP_KEY=._|APP_KEY=base64:$(openssl rand -base64 32)|g" /data/coolify/source/.env
sudo sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env
sudo sed -i "s|REDIS_PASSWORD=._|REDIS_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env
sudo sed -i "s|PUSHER_APP_ID=._|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env
sudo sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env
sudo sed -i "s|PUSHER_APP_SECRET=.\*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env
sudo chown -R 9999:root /data/coolify/
sudo chmod -R 700 /data/coolify/
sudo docker network create --attachable coolify
sudo 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 --pull always --remove-orphans --force-recreate
sudo docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml down

View File

@ -197,13 +197,10 @@ fi
echo -e "-------------"
#add directories here that you want to modify
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,public,notifications,models,livewire,tailwind}
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy}
mkdir -p /data/coolify/ssh/{keys,mux}
mkdir -p /data/coolify/proxy/dynamic
chown -R 9999:root /data/coolify
chmod -R 700 /data/coolify
# echo "Downloading required files from CDN..."
# curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.yml
# curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml
@ -222,6 +219,9 @@ cp -r /home/lasthour/lasthourcloud/app/Livewire /data/coolify/
cp /home/lasthour/lasthourcloud/.coolify-logo /data/coolify/.coolify-logo
cp /home/lasthour/lasthourcloud/tailwind.config.js /data/coolify/tailwind
chown -R 9999:root /data/coolify
chmod -R 700 /data/coolify
# 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