tt
This commit is contained in:
parent
3c624f97b3
commit
786473ac52
@ -38,12 +38,13 @@ function update_script() {
|
|||||||
systemctl stop nginx
|
systemctl stop nginx
|
||||||
msg_ok "Stopped nginx"
|
msg_ok "Stopped nginx"
|
||||||
|
|
||||||
msg_info "Updating ${APP} to v${RELEASE_BARASSISTANT}"
|
msg_info "Backing up Bar Assistant"
|
||||||
cd /opt
|
|
||||||
mv /opt/bar-assistant /opt/bar-assistant-backup
|
mv /opt/bar-assistant /opt/bar-assistant-backup
|
||||||
curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip
|
msg_ok "Backed up Bar Assistant"
|
||||||
unzip -q barassistant.zip
|
|
||||||
mv /opt/bar-assistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant
|
fetch_and_deploy_gh_release "bar-assistant" "karlomikus/bar-assistant" "tarball" "latest" "/opt/bar-assistant"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP} to v${RELEASE_BARASSISTANT}"
|
||||||
cp -r /opt/bar-assistant-backup/.env /opt/bar-assistant/.env
|
cp -r /opt/bar-assistant-backup/.env /opt/bar-assistant/.env
|
||||||
cp -r /opt/bar-assistant-backup/storage/bar-assistant /opt/bar-assistant/storage/bar-assistant
|
cp -r /opt/bar-assistant-backup/storage/bar-assistant /opt/bar-assistant/storage/bar-assistant
|
||||||
cd /opt/bar-assistant
|
cd /opt/bar-assistant
|
||||||
@ -56,7 +57,6 @@ function update_script() {
|
|||||||
$STD php artisan route:cache
|
$STD php artisan route:cache
|
||||||
$STD php artisan event:cache
|
$STD php artisan event:cache
|
||||||
chown -R www-data:www-data /opt/bar-assistant
|
chown -R www-data:www-data /opt/bar-assistant
|
||||||
echo "${RELEASE_BARASSISTANT}" >/opt/${APP}_version.txt
|
|
||||||
msg_ok "Updated $APP to v${RELEASE_BARASSISTANT}"
|
msg_ok "Updated $APP to v${RELEASE_BARASSISTANT}"
|
||||||
|
|
||||||
msg_info "Starting nginx"
|
msg_info "Starting nginx"
|
||||||
@ -64,7 +64,6 @@ function update_script() {
|
|||||||
msg_ok "Started nginx"
|
msg_ok "Started nginx"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf /opt/barassistant.zip
|
|
||||||
rm -rf /opt/bar-assistant-backup
|
rm -rf /opt/bar-assistant-backup
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
else
|
else
|
||||||
@ -72,21 +71,21 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f /opt/vue-salt-rim_version.txt ]] || [[ "${RELEASE_SALTRIM}" != "$(cat /opt/vue-salt-rim_version.txt)" ]]; then
|
if [[ ! -f /opt/vue-salt-rim_version.txt ]] || [[ "${RELEASE_SALTRIM}" != "$(cat /opt/vue-salt-rim_version.txt)" ]]; then
|
||||||
|
msg_info "Backing up Vue Salt Rim"
|
||||||
|
mv /opt/vue-salt-rim /opt/vue-salt-rim-backup
|
||||||
|
msg_ok "Backed up Vue Salt Rim"
|
||||||
|
|
||||||
msg_info "Stopping nginx"
|
msg_info "Stopping nginx"
|
||||||
systemctl stop nginx
|
systemctl stop nginx
|
||||||
msg_ok "Stopped nginx"
|
msg_ok "Stopped nginx"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "vue-salt-rim" "karlomikus/vue-salt-rim" "tarball" "latest" "/opt/vue-salt-rim"
|
||||||
|
|
||||||
msg_info "Updating Salt Rim to v${RELEASE_SALTRIM}"
|
msg_info "Updating Salt Rim to v${RELEASE_SALTRIM}"
|
||||||
cd /opt
|
|
||||||
mv /opt/vue-salt-rim /opt/vue-salt-rim-backup
|
|
||||||
curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELEASE_SALTRIM}.zip" -o saltrim.zip
|
|
||||||
unzip -q saltrim.zip
|
|
||||||
mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim
|
|
||||||
cp /opt/vue-salt-rim-backup/public/config.js /opt/vue-salt-rim/public/config.js
|
cp /opt/vue-salt-rim-backup/public/config.js /opt/vue-salt-rim/public/config.js
|
||||||
cd /opt/vue-salt-rim
|
cd /opt/vue-salt-rim
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt
|
|
||||||
msg_ok "Updated $APP to v${RELEASE_SALTRIM}"
|
msg_ok "Updated $APP to v${RELEASE_SALTRIM}"
|
||||||
|
|
||||||
msg_info "Starting nginx"
|
msg_info "Starting nginx"
|
||||||
@ -94,7 +93,6 @@ function update_script() {
|
|||||||
msg_ok "Started nginx"
|
msg_ok "Started nginx"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf /opt/saltrim.zip
|
|
||||||
rm -rf /opt/vue-salt-rim-backup
|
rm -rf /opt/vue-salt-rim-backup
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
msg_ok "Updated"
|
msg_ok "Updated"
|
||||||
@ -107,21 +105,12 @@ function update_script() {
|
|||||||
systemctl stop meilisearch
|
systemctl stop meilisearch
|
||||||
msg_ok "Stopped Meilisearch"
|
msg_ok "Stopped Meilisearch"
|
||||||
|
|
||||||
msg_info "Updating Meilisearch to ${RELEASE_MEILISEARCH}"
|
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary"
|
||||||
cd /opt
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
||||||
curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o meilisearch.deb
|
|
||||||
$STD dpkg -i meilisearch.deb
|
|
||||||
echo "${RELEASE_MEILISEARCH}" >/opt/meilisearch_version.txt
|
|
||||||
msg_ok "Updated Meilisearch to ${RELEASE_MEILISEARCH}"
|
|
||||||
|
|
||||||
msg_info "Starting Meilisearch"
|
msg_info "Starting Meilisearch"
|
||||||
systemctl start meilisearch
|
systemctl start meilisearch
|
||||||
msg_ok "Started Meilisearch"
|
msg_ok "Started Meilisearch"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -rf "/opt/meilisearch.deb"
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
msg_ok "Updated Meilisearch"
|
msg_ok "Updated Meilisearch"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. Meilisearch is already at ${RELEASE_MEILISEARCH}"
|
msg_ok "No update required. Meilisearch is already at ${RELEASE_MEILISEARCH}"
|
||||||
|
@ -24,7 +24,7 @@ $STD apt-get install -y \
|
|||||||
#php-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm}
|
#php-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm}
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PHP_VERSION=8.3 PHP_MODULE="ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm" setup_php
|
PHP_VERSION="8.3" PHP_FPM=YES PHP_MODULE="ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm" setup_php
|
||||||
setup_composer
|
setup_composer
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary"
|
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user