Git Product home page Git Product logo

api_flask_python_hello-world's People

Contributors

danoncall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api_flask_python_hello-world's Issues

PORT environment variable missing

Hey, I just followed this tutorial, and the PORT variable is missing from the .env file.

When setting up the .env file according to the tutorial:

cat .env

>CLIENT_ORIGIN_URL=http://localhost:4040
>AUTH0_AUDIENCE=https://xxx
>AUTH0_DOMAIN=xxx.eu.auth0.com

docker-compose up

The following error message is presented (notice the second to last line, Missing PORT environment variable):

Recreating api_flask_python_hello-world_api_1 ... done
Attaching to api_flask_python_hello-world_api_1
api_1  | Failed to read config file: /app/gunicorn.conf.py
api_1  | Traceback (most recent call last):
api_1  |   File "/app/common/utils/__init__.py", line 5, in safe_get_env_var
api_1  |     return environ[key]
api_1  |   File "/usr/lib/python3.9/os.py", line 679, in __getitem__
api_1  |     raise KeyError(key) from None
api_1  | KeyError: 'PORT'
api_1  |
api_1  | During handling of the above exception, another exception occurred:
api_1  |
api_1  | Traceback (most recent call last):
api_1  |   File "/packages/gunicorn/app/base.py", line 111, in get_config_from_filename
api_1  |     spec.loader.exec_module(mod)
api_1  |   File "<frozen importlib._bootstrap_external>", line 790, in exec_module
api_1  |   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
api_1  |   File "/app/gunicorn.conf.py", line 10, in <module>
api_1  |     bind = f"0.0.0.0:{safe_get_env_var('PORT')}"
api_1  |   File "/app/common/utils/__init__.py", line 7, in safe_get_env_var
api_1  |     raise NameError(f"Missing {key} environment variable.")
api_1  | NameError: Missing PORT environment variable.
api_flask_python_hello-world_api_1 exited with code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.