Only pull image when needed.

This commit is contained in:
Derek Smith 2023-12-15 16:44:06 -05:00
parent 123fef5103
commit 37ca0678f7
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
6 changed files with 23 additions and 10 deletions

View File

@ -3,7 +3,10 @@
set -e
# let's do a refresh of the certificates. Let's Encrypt will not run if it's not time.
docker pull certbot/certbot:latest
CERTBOT_IMAGE_NAME="certbot/certbot:latest"
if ! docker image inspect "$CERTBOT_IMAGE_NAME" &> /dev/null; then
docker pull "$CERTBOT_IMAGE_NAME"
fi
# iterate over each domain and call certbot
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do

View File

@ -3,8 +3,9 @@
set -eu
cd "$(dirname "$0")"
docker pull "$GHOST_IMAGE"
if ! docker image inspect "$GHOST_IMAGE" &> /dev/null; then
docker pull "$GHOST_IMAGE"
fi
DEPLOY_STACK=false
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do

View File

@ -4,8 +4,13 @@ set -eu
cd "$(dirname "$0")"
docker pull "$GITEA_IMAGE"
docker pull "$GITEA_DB_IMAGE"
if ! docker image inspect "$GITEA_IMAGE" &> /dev/null; then
docker pull "$GITEA_IMAGE"
fi
if ! docker image inspect "$GITEA_DB_IMAGE" &> /dev/null; then
docker pull "$GITEA_DB_IMAGE"
fi
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
export DOMAIN_NAME="$DOMAIN_NAME"

View File

@ -3,9 +3,9 @@
set -eu
cd "$(dirname "$0")"
docker pull "$NEXTCLOUD_IMAGE"
if ! docker image inspect "$NEXTCLOUD_IMAGE" &> /dev/null; then
docker pull "$NEXTCLOUD_IMAGE"
fi
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
export DOMAIN_NAME="$DOMAIN_NAME"

View File

@ -3,7 +3,9 @@
set -e
cd "$(dirname "$0")"
docker pull "$NGINX_IMAGE"
if ! docker image inspect "$NEXTCLOUD_IMAGE" &> /dev/null; then
docker pull "$NGINX_IMAGE"
fi
#https://github.com/fiatjaf/expensive-relay
# NOSTR RELAY WHICH REQUIRES PAYMENTS.

View File

@ -3,7 +3,9 @@
set -eu
cd "$(dirname "$0")"
docker pull "$NOSTR_RELAY_IMAGE"
if ! docker image inspect "$NOSTR_RELAY_IMAGE" &> /dev/null; then
docker pull "$NOSTR_RELAY_IMAGE"
fi
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
export DOMAIN_NAME="$DOMAIN_NAME"