Christian Winther 1 vuosi sitten
vanhempi
commit
be2ba79dc2

+ 9 - 0
.env.docker

@@ -995,6 +995,15 @@ DOCKER_APP_CACHE_PATH="${DOCKER_DATA_ROOT}/pixelfed/cache"
 # Port that Redis will listen on *outside* the container (e.g. the host machine)
 DOCKER_REDIS_PORT_EXTERNAL="${REDIS_PORT:-6379}"
 
+# The filename that Redis should store its config file within
+#
+# NOTE: The file *MUST* exists (even empty) before enabling this setting!
+#
+# Use a command like [touch "${DOCKER_CONFIG_ROOT}/redis/redis.conf"] to create it.
+#
+# Defaults to ""
+#DOCKER_REDIS_CONFIG_FILE="/etc/redis/redis.conf"
+
 # Port that the database will listen on *outside* the container (e.g. the host machine)
 #
 # Use "3306" for MySQL/MariaDB and "5432" for PostgreeSQL

+ 1 - 1
docker-compose.yml

@@ -131,7 +131,7 @@ services:
     image: redis:7.2
     container_name: "${DOCKER_CONTAINER_NAME_PREFIX}-redis"
     restart: unless-stopped
-    command: ["/etc/redis/redis.conf", "--requirepass", "${REDIS_PASSWORD:-}"]
+    command: "${DOCKER_REDIS_CONFIG_FILE} --requirepass '${REDIS_PASSWORD:-}'"
     environment:
       - REDISCLI_AUTH=${REDIS_PASSWORD:-}
     env_file:

+ 0 - 3
docker/shared/root/docker/entrypoint.d/00-check-config.sh

@@ -16,6 +16,3 @@ for file in "${dot_env_files[@]}"; do
     log-info "Linting dotenv file ${file}"
     dotenv-linter --skip=QuoteCharacter --skip=UnorderedKey "${file}"
 done
-
-# Write the config cache
-run-as-runtime-user php artisan config:cache

+ 1 - 1
docker/shared/root/docker/entrypoint.d/12-migrations.sh

@@ -14,7 +14,7 @@ await-database-ready
 
 # Detect if we have new migrations
 declare -i new_migrations=0
-run-as-runtime-user php artisan migrate:status | grep No && new_migrations=1
+(run-as-runtime-user php artisan migrate:status || :) | grep No && new_migrations=1
 
 if is-true "${new_migrations}"; then
     log-info "No outstanding migrations detected"