Closed dragosrotaru closed 1 year ago
Did you change example.env to .env?
@alextran1502
redis:
container_name: immich_redis
image: redis:6.2
restart: always
its obvious just from reading this code that the environment variables have no effect. The .env
file provided to docker-compose is not auto passed on to the container, for that you need to use the env_file
key. Also, even if it was passed to the redis image as environment variables, the redis image would have no idea what to do with it because these settings need to be configured via the redis CLI or via redis.conf
. Doing a search on the repo, I see these variables are only used in Data Access Layer adapters, so I am highly confident they have no effect on Redis itself.
Sources:
Hmm I haven't visited Redis container for a while but I believe we did have some environment variables option for the container. Oh right we have redis options for the server's queue so we put environment variable for the server to point to the external Redis service, but we don't have anything setup for the Redis container in Immich setup
No worries, I can submit a PR
On Thu, Mar 9, 2023, 4:07 p.m. Alex @.***> wrote:
Hmm I haven't visited Redis container for a while but I believe we did have some environment variables option for the container. Oh right we have redis options for the server's queue so we put environment variable for the server to point to the external Redis service, but we don't have anything setup for the Redis container in Immich setup
— Reply to this email directly, view it on GitHub https://github.com/immich-app/immich/issues/1973#issuecomment-1461523262, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZCWGKLIES7OU33D4FAWALW3GFURANCNFSM6AAAAAAVUVZFQU . You are receiving this because you authored the thread.Message ID: @.***>
There's no need to passthrough env variables to the redis container, as the defaults work just fine for Immich. Of course if you want to change some settings on your own setup, you're free to do that.
@bo0tzz Then the documentation should be updated to reflect that, because the example.env
lists Redis parameters that are not actually passed to redis. I wasted time to find that out, and so will anyone that looks at the documentation and sees:
###################################################################################
# Redis
###################################################################################
REDIS_HOSTNAME=immich_redis
# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=
# REDIS_SOCKET=
This should say:
# These parameters are not passed to Redis in the docker-compose.yml config.
Documentation should reflect the reality of how something works so that people without knowledge of internals don't waste time digging into the internals to find out
Feel free to open a PR if you think it should be updated.
The bug
Looks like the docker-compose.yml file does not actually pass in the Redis environment variables shown in
example.env
The OS that Immich Server is running on
Any`
Version of Immich Server
1.50.1
Version of Immich Mobile App
N/A
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response