Skip to content
\n

Since we didn't want to add sensitive data like the database password to git, we added it ($PRODUCTION_DB_DATABASE) to our local .env file. It worked before in version v1.16.7, but was probably never intended to be supported at all.

\n

I guess we should switch to the new hosting provider integration (shipped with v1.17.0) to implement our functionality without the need for the production database password at all (e.g. using only SSH access).

\n

Looking forward for any help and opinions!

\n

The custom command was copied from this gist and slightly adjusted:
\nhttps://gist.github.com/peterkraume/6646acca841274516c41a3644010bbae

","upvoteCount":1,"answerCount":3,"acceptedAnswer":{"@type":"Answer","text":"

ddev has never had any support for .env files. docker-compose might have had some kind of change...

","upvoteCount":2,"url":"https://github.com/orgs/ddev/discussions/2940#discussioncomment-589880"}}}

Availability of environment variables from .env file in user-defined commands #2940

Answered by rfay
dahaupt asked this question in Q&A
Discussion options

You must be logged in to vote

ddev has never had any support for .env files. docker-compose might have had some kind of change...

Replies: 3 comments 19 replies

Comment options

You must be logged in to vote
8 replies
@rfay
Comment options

rfay Apr 23, 2021
Maintainer

@rfay
Comment options

rfay Apr 23, 2021
Maintainer

@h1nds1ght
Comment options

@rfay
Comment options

rfay Jun 30, 2022
Maintainer

@h1nds1ght
Comment options

Answer selected by dahaupt
Comment options

You must be logged in to vote
3 replies
@rfay
Comment options

rfay Nov 18, 2021
Maintainer

@dahaupt
Comment options

@mandrasch
Comment options

Comment options

You must be logged in to vote
8 replies
@riconeitzel
Comment options

@rfay
Comment options

rfay Feb 28, 2023
Maintainer

@lhridley
Comment options

@lhridley
Comment options

@riconeitzel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants