Pin Grav version, install plugins as part of remote-install

This commit is contained in:
2026-06-13 21:08:50 +02:00
parent bc3df5c24b
commit c7877f3ce0
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -2,6 +2,7 @@ REMOTE_USER=root
REMOTE_HOST=example.com REMOTE_HOST=example.com
REMOTE_HOME=/home/example.com REMOTE_HOME=/home/example.com
REPO=https://gitea.example.com/user/natascha-rieter.nl-user.git REPO=https://gitea.example.com/user/natascha-rieter.nl-user.git
GRAV_VERSION=1.7.49.5
GITEA_HOST=gitea.example.com GITEA_HOST=gitea.example.com
GITEA_USER=natascha-deploy GITEA_USER=natascha-deploy
+1 -1
View File
@@ -25,7 +25,7 @@ content-pull:
# Remote # Remote
remote-install: remote-install:
ssh $(SSH) "WEBROOT=$(WEBROOT) REPO=$(REPO) GITEA_HOST=$(GITEA_HOST) GITEA_USER=$(GITEA_USER) GITEA_TOKEN=$(GITEA_TOKEN) bash -s" < scripts/server-install.sh ssh $(SSH) "WEBROOT=$(WEBROOT) REPO=$(REPO) GRAV_VERSION=$(GRAV_VERSION) PLUGINS='$(shell cat plugins.txt | tr '\n' ' ')' GITEA_HOST=$(GITEA_HOST) GITEA_USER=$(GITEA_USER) GITEA_TOKEN=$(GITEA_TOKEN) bash -s" < scripts/server-install.sh
remote-install-plugins: remote-install-plugins:
ssh $(SSH) "cd $(WEBROOT) && php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y" ssh $(SSH) "cd $(WEBROOT) && php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y"
+7 -2
View File
@@ -3,13 +3,15 @@ set -e
: "${WEBROOT:?WEBROOT is not set}" : "${WEBROOT:?WEBROOT is not set}"
: "${REPO:?REPO is not set}" : "${REPO:?REPO is not set}"
: "${GRAV_VERSION:?GRAV_VERSION is not set}"
: "${PLUGINS:?PLUGINS is not set}"
: "${GITEA_HOST:?GITEA_HOST is not set}" : "${GITEA_HOST:?GITEA_HOST is not set}"
: "${GITEA_USER:?GITEA_USER is not set}" : "${GITEA_USER:?GITEA_USER is not set}"
: "${GITEA_TOKEN:?GITEA_TOKEN is not set}" : "${GITEA_TOKEN:?GITEA_TOKEN is not set}"
echo "==> Downloading Grav" echo "==> Downloading Grav $GRAV_VERSION"
cd "$WEBROOT" cd "$WEBROOT"
wget -q https://getgrav.org/download/core/grav-admin/latest -O grav-admin.zip wget -q "https://getgrav.org/download/core/grav-admin/$GRAV_VERSION" -O grav-admin.zip
unzip -q grav-admin.zip unzip -q grav-admin.zip
mv grav-admin/* grav-admin/.htaccess . mv grav-admin/* grav-admin/.htaccess .
rm -rf grav-admin grav-admin.zip rm -rf grav-admin grav-admin.zip
@@ -21,6 +23,9 @@ rm -rf user
git clone "$REPO" user git clone "$REPO" user
rm ~/.netrc rm ~/.netrc
echo "==> Installing plugins"
php bin/gpm install $PLUGINS -y
echo "==> Setting permissions" echo "==> Setting permissions"
find "$WEBROOT" -type f -exec chmod 664 {} \; find "$WEBROOT" -type f -exec chmod 664 {} \;
find "$WEBROOT" -type d -exec chmod 775 {} \; find "$WEBROOT" -type d -exec chmod 775 {} \;