docker-compose config/environment variables not present.
See original GitHub issueDescription
Not able to fire up local prefect server backend / prefect server start
environment variables are not loaded when server.py runs docker-compose up
WARNING: The POSTGRES_DB variable is not set. Defaulting to a blank string. WARNING: The POSTGRES_PASSWORD variable is not set. Defaulting to a blank string. WARNING: The POSTGRES_USER variable is not set. Defaulting to a blank string.
Reproduction
No exports in .profile or .bash_rc clean install on linux Ubuntu 18 pip install prefect prefect backend server (copied and adjusted backend.toml with git config.toml) prefect server start, not able to start postgres , warning
env vars from config are present in server.py however subprocess.Popen(… , env=env) not working fires: docker-compose up
creating a .env file where tmp/docker-compose.yml is placed worked, postgres starts however running into new issues graphql not able to connect.
Environment
Python 3.6.9 (default, Oct 8 2020, 12:12:24) [GCC 8.4.0] on linux
Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic
docker-compose version 1.27.4, build 4052419 docker-py version: 4.3.1 CPython version: 3.7.7
Client: Docker Engine - Community Version: 19.03.13 API version: 1.40
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Thanks for sharing this, seems like problems are resolved… all docker stuff was up to date / newest.
What I’ve missed: – pip3 install docker-compose
Could reproduce my errors by uninstalling
pip3 uninstall docker-compose
And all issues returned.– pip3 install docker-compose I think I missed it in the documenation, however it isnt mentioned here https://docs.prefect.io/core/getting_started/installation.html ?
Again thank you
I’m glad you got it working! Since I cannot replicate a situation where a
.env
file is required and we’ve solved the original issue here I’m going to close this for now. Thanks for your help everyone!