Closed SnowNooDLe closed 3 years ago
When switching from the working config to the one using a .env
file, did you clear out your volume?
(docker-compose down --volumes
)
When switching from the working config to the one using a
.env
file, did you clear out your volume? (docker-compose down --volumes
)
Thanks for the reply! I have never done that command docker-compose down -v
so just tried that way but still didn't work :(
I even tried to change the name of service from db
to mydb
as I noticed that this refers to the 'server' section in aminer.
(Assuming change it to the different server name, creating a server with a fresh config...?)
But still not working :(
In case someone is having the same issue, I solved this problem by adding one extra parameter in the command line to run docker-compose.yml.
Do (Assuming your .env file name is also .env)
docker-compose --env-file .env up -d
Instead of doing
docker-compose up -d
By doing the one with --env-file .env
, we can also confirm that variables are passed properly by typing docker-compose config
as well.
I shall leave this opens in case someone wants to see regarding this problem, but please feel free to close this issue :+1:
Nice, glad you got it figured out! :+1:
(In the future, these sorts of questions/requests would be more appropriately posted to a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow.)
Nice, glad you got it figured out!
(In the future, these sorts of questions/requests would be more appropriately posted to a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow.)
Will do! Thanks for the feedback/recommendation :)
Hey guys,
Recently joined dev world, a fresh developer here. Please correct me if I am doing something wrong :)
So I am currently working on a web app project with React + Flask and we decided to use MariaDB with SQLAlchemy. We also decided to use with docker as our React and Flask are also running on docker as well. The current
docker-compose.yml
is like the following code.Working fine
With the code above, it works as we expected, we can put user and user via adminer to see what's happening. However,
Not working
with
.env
This is not working as we expected, it gives us the access denied error message.
I also tried parsing
env_file: .env
in thedocker-compose.yml
and still didn't work :(Is this a related issue to this PR? Add support for MARIADB_ versions of env vars or is there a different way of using/parsing
.env
variables to docker-compose.yml? (I am like 99% confident that the syntax of parsing .env variables is fine as this is how we set up the docker-compose for React and Flask.)As I could only see the usage of MariaDB docker-compose.yml with specified environment variables instead of using
.env
and I am not sure whether it is a good practice to make those information visible (e.g, password and root_password)Thanks for reading a long post and happy to get any feedback or answers! :+1: