Hey!
Just got my macbook pro, and decided to code my stuff on it with container compose.
The biggest issueI just came across is variable interpolation.
Here is the file:
services:
redis:
image: redis:7-alpine
container_name: victoria-redis
ports:
- "6379:6379"
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-devpassword}"]
env_file:
- .env
volumes:
- redis_data:/data
restart: unless-stopped
volumes:
redis_data:
and .env:
REDIS_PASSWORD=mypassword
You would expect to be able to connect to redis://localhost:6379 with the password "mypassword" right?
Wrong! Unlike with docker, the password will be "${REDIS_PASSWORD:-devpassword} ", literally.
This has been a very annoying issue I came across.
Hoping it'll get fixed soon!
Cheers,
Adam
Hey!
Just got my macbook pro, and decided to code my stuff on it with container compose.
The biggest issueI just came across is variable interpolation.
Here is the file:
and .env:
You would expect to be able to connect to
redis://localhost:6379with the password "mypassword" right?Wrong! Unlike with docker, the password will be "${REDIS_PASSWORD:-devpassword} ", literally.
This has been a very annoying issue I came across.
Hoping it'll get fixed soon!
Cheers,
Adam