1
0

fix: Optimize redis command (#4165)

This commit is contained in:
ssongliu
2025-06-22 22:42:11 +08:00
committed by GitHub
parent 8a76bb1458
commit fa03027d54
3 changed files with 3 additions and 21 deletions

View File

@@ -7,13 +7,7 @@ services:
- 1panel-network - 1panel-network
ports: ports:
- ${PANEL_APP_PORT_HTTP}:6379 - ${PANEL_APP_PORT_HTTP}:6379
command: > command: redis-server /etc/redis/redis.conf ${PANEL_REDIS_ROOT_PASSWORD:+--requirepass "${PANEL_REDIS_ROOT_PASSWORD}"}
sh -c '
if [ -z "${PANEL_REDIS_ROOT_PASSWORD}" ]; then
redis-server /etc/redis/redis.conf
else
redis-server /etc/redis/redis.conf --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
fi'
volumes: volumes:
- ./data:/data - ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf - ./conf/redis.conf:/etc/redis/redis.conf

View File

@@ -7,13 +7,7 @@ services:
- 1panel-network - 1panel-network
ports: ports:
- ${PANEL_APP_PORT_HTTP}:6379 - ${PANEL_APP_PORT_HTTP}:6379
command: > command: redis-server /etc/redis/redis.conf ${PANEL_REDIS_ROOT_PASSWORD:+--requirepass "${PANEL_REDIS_ROOT_PASSWORD}"}
sh -c '
if [ -z "${PANEL_REDIS_ROOT_PASSWORD}" ]; then
redis-server /etc/redis/redis.conf
else
redis-server /etc/redis/redis.conf --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
fi'
volumes: volumes:
- ./data:/data - ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf - ./conf/redis.conf:/etc/redis/redis.conf

View File

@@ -7,13 +7,7 @@ services:
- 1panel-network - 1panel-network
ports: ports:
- ${PANEL_APP_PORT_HTTP}:6379 - ${PANEL_APP_PORT_HTTP}:6379
command: > command: redis-server /etc/redis/redis.conf ${PANEL_REDIS_ROOT_PASSWORD:+--requirepass "${PANEL_REDIS_ROOT_PASSWORD}"}
sh -c '
if [ -z "${PANEL_REDIS_ROOT_PASSWORD}" ]; then
redis-server /etc/redis/redis.conf
else
redis-server /etc/redis/redis.conf --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
fi'
volumes: volumes:
- ./data:/data - ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf - ./conf/redis.conf:/etc/redis/redis.conf