lasthourcloud/scripts/upgrade.sh

19 lines
1.1 KiB
Bash
Raw Normal View History

2023-04-27 10:52:13 +00:00
#!/bin/bash
## Do not modify this file. You will lost the ability to autoupdate!
2023-04-28 12:39:14 +00:00
###########
## Always run "php artisan app:sync-to-bunny-cdn --env=secrets" if you update this file.
###########
VERSION="1.0.0"
2023-06-06 07:22:48 +00:00
CDN="https://cdn.coollabs.io/coolify"
2023-04-27 12:45:45 +00:00
2023-05-25 13:47:27 +00:00
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
curl -fsSL $CDN/.env.production -o /data/coolify/source/.env.production
2023-06-12 12:48:21 +00:00
# Merge .env and .env.production. New values will be added to .env
2023-06-12 12:54:46 +00:00
sort -u -t '=' -k 1,1 /data/coolify/source/.env /data/coolify/source/.env.production | sed '/^$/d' > /data/coolify/source/.env.temp && mv /data/coolify/source/.env.temp /data/coolify/source/.env
2023-06-12 12:48:21 +00:00
2023-08-11 14:13:53 +00:00
docker run --pull always -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 --pull always --remove-orphans --force-recreate"