-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.env file is unable to use environment variables declared within itself #95
Comments
I've faced same issue and can confirm that |
Caused by docker/compose#9442 |
As a workaround one may use the following script IFS=$'\n'
for e in `grep -v '^#' .env`; do export `echo $e | envsubst`; done
docker compose -f docker-compose.yml -f docker-compose.nginx.yml build
docker compose -f docker-compose.yml -f docker-compose.nginx.yml down
docker compose -f docker-compose.yml -f docker-compose.nginx.yml up -d It reads and interpolates |
I'm having trouble with the following error-messages:
Is this related to this issue? |
Your docker-compose version is too old, please see this thread for details. You will need to have at least 1.26.0, which is the first version that supports variable substitution in your |
I'm also encountering the same error. I have installed the newest version of docker-compose and the error still remains |
https://docs.mattermost.com/install/install-docker.html
I'm not using docker-compse, because it was obsoleted. I'm sorry, i made a typo in step 2:
Now it works |
I recently started using Mattermost with Docker. As instructed in the Deployment Guide, I cloned the repository, copied the
env.example
file to a.env
file, filled out the environment variables and started the server. However, it didn't start properly and after viewing the logs withdocker logs
, the error turned out to beAfter some thought, I noticed that
MM_SETTINGS_SITEURL
(line 38) was usinghttps://${DOMAIN}
as its value, so I hardcoded my domain into it instead of using the environment variable. After that, I received this error:This error clearly shows that the file is interpreting the environment variables literally instead of as environment variables, so I hardcoded the credentials into
MM_SQLSETTINGS_DATASOURCE
and Mattermost was able to successfully connect to the database and launch. There are also two other variables which use other variables, namelyCERT_PATH
(line 41) andKEY_PATH
(line 42), but since I don't use Gitlab SSO, I haven't tried them.I'm using Docker 20.10.14 on Debian GNU/Linux 11 (bullseye).
The text was updated successfully, but these errors were encountered: