fixed docker compose build policy

This commit is contained in:
Moritz
2025-08-24 20:34:01 +02:00
parent 507b9bf5a7
commit c758c236f1
3 changed files with 6 additions and 6 deletions

View File

@@ -23,8 +23,8 @@ MOONLIGHT_DATABASE_NAME=moonlight
# This defines the way to get the moonlight docker image # This defines the way to get the moonlight docker image
# By default moonlight will build the image locally. To pull # By default moonlight will build the image locally. To pull
# it from the registry, set the value to 'pull' # it from the registry, set the value to 'always'
MOONLIGHT_BUILD=pull MOONLIGHT_PULL_POLICY=build
# This defines the image name to use when building/pulling # This defines the image name to use when building/pulling
# the moonlight docker image # the moonlight docker image

View File

@@ -31,7 +31,7 @@ services:
- ${MOONLIGHT_DATA}/moonlight:/app/storage - ${MOONLIGHT_DATA}/moonlight:/app/storage
links: links:
- db - db
pull_policy: ${MOONLIGHT_BUILD} pull_policy: ${MOONLIGHT_PULL_POLICY}
db: db:
image: postgres:latest image: postgres:latest

View File

@@ -27,15 +27,15 @@ else
echo "[i] No update of the deploy repository available" echo "[i] No update of the deploy repository available"
fi fi
if [ "$MOONLIGHT_BUILD" == "build" ]; then if [ "$MOONLIGHT_PULL_POLICY" == "build" ]; then
echo "[i] Rebuilding the docker image" echo "[i] Rebuilding the docker image"
docker compose build docker compose build
echo "[i] Rebuild done" echo "[i] Rebuild done"
fi fi
if [ "$MOONLIGHT_BUILD" == "pull" ]; then if [ "$MOONLIGHT_PULL_POLICY" == "always" ]; then
echo "[i] Pulling the latest docker image" echo "[i] Pulling the latest docker image"
docker compose build docker compose pull
echo "[i] Pulling completed" echo "[i] Pulling completed"
fi fi