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
# By default moonlight will build the image locally. To pull
# it from the registry, set the value to 'pull'
MOONLIGHT_BUILD=pull
# it from the registry, set the value to 'always'
MOONLIGHT_PULL_POLICY=build
# This defines the image name to use when building/pulling
# the moonlight docker image

View File

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

View File

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