Environment variables ignored (√ SOLVED)


#1

I installed Redash in an AWS instance, from an AMI listed in the official documentation.

In overall, everything is working good, except that when I try to add or edit an environment variable, it’s being ignored. I read a similar thread in this forum, but the solution posted there didn’t worked for me.

According to the documentation, the env file is located in /opt/redash/env.

I’m basically adding email settings variables and REDASH_FEATURE_SHOW_PERMISSIONS_CONTROL=true, to be able to manage permissions in dashboards.

REDASH_MAIL_SERVER="secure.emailsrvr.com"
REDASH_MAIL_PORT="993"
REDASH_MAIL_USE_TLS=true
REDASH_MAIL_USE_SSL=true
REDASH_MAIL_USERNAME="xxx@xxx.com"
REDASH_MAIL_PASSWORD="XXXXXXXX"
REDASH_MAIL_DEFAULT_SENDER="xxx@xxx.com"
REDASH_HOST="reports.xxx.com"
REDASH_FEATURE_SHOW_PERMISSIONS_CONTROL=true

After inserting the variables, neither the email settings, default Host or show permissions are working.

I also have tried by entering directly the variable:

export REDASH_REMOTE_USER_LOGIN_ENABLED=True

After any change, I’m restarting the related services through. I have also reboot the instance, and nothing:

sudo supervisorctl restart all

I don’t have any clue of what may be happening.

Appreciate any help. Thanks!


#2

Did you run docker-compose up -d after changing the values?


#3

I ran docker-compose up -d within /opt/redash. Then, sudo supervisorctl restart all

For some reason. Know my instance show a 502 error. I tried to set the original variables in the env file, but I’m not able to make it work again. I’m stuck at this point. I don’t know what to do, or at least get a dump of my postgres and retrieve all my snippets. I had like 30 advanced queries saved in that instance :S

PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=XXX
REDASH_COOKIE_SECRET=XXXX

REDASH_DATABASE_URL=postgresql://postgres:XXXX@postgres/postgres


#4

I solved it by following the solution showed in: FATAL: password authentication failed for user "postgres", after "docker-compose up -d" on your EC2 AMI

Thanks.