Skip to content
Snippets Groups Projects
Verified Commit 0da30b63 authored by Mark's avatar Mark
Browse files

Add documentation and fix environment variables

parent bdbe0a69
No related branches found
No related tags found
1 merge request!3Change login provider backend to graphql
...@@ -11,6 +11,8 @@ EXPOSE 5000 ...@@ -11,6 +11,8 @@ EXPOSE 5000
ENV FLASK_ENV production ENV FLASK_ENV production
ENV FLASK_RUN_HOST 0.0.0.0 ENV FLASK_RUN_HOST 0.0.0.0
ENV HYDRA_ADMIN_URL http://localhost:4445 ENV FLASK_RUN_PORT 5000
ENV HYDRA_ADMIN_URL http://localhost:444
ENV GRAPHQL_URL http://localhost:5002/graphql
CMD [ "flask", "run" ] CMD [ "flask", "run" ]
# Configuration
To enable the `debug` mode, set the environment variable `FLASK_ENV` to `development`.
```
export FLASK_ENV=development
# or
docker login-provider:latest build . && docker run -e FLASK_ENV=development login-provider
```
You can do the same with the following variables.
* **FLASK_SECRET_KEY** A secret key that will be used for securely signing the session cookie.
* **FLASK_RUN_HOST** IP Address that the server will open a socket on.
*Default*: 0.0.0.0
* **FLASK_RUN_PORT** Port of the socket that the server will listen on.
*Default*: 5000
* **GRAPHQL_URL** URL to the server that runs the graphql backend API
*Default*: http://localhost:5002/graphql
* **HYDRA_ADMIN_URL** URl to the Hydra admin server
*Default*: http://localhost:4445
...@@ -9,8 +9,8 @@ HYDRA_ADMIN_URL = environ['HYDRA_ADMIN_URL'] ...@@ -9,8 +9,8 @@ HYDRA_ADMIN_URL = environ['HYDRA_ADMIN_URL']
hydra = HydraAdmin(HYDRA_ADMIN_URL) hydra = HydraAdmin(HYDRA_ADMIN_URL)
app = Flask(__name__) app = Flask(__name__)
app.config['SECRET_KEY'] = urandom(16) if "FLASK_SECRET_KEY" not in environ:
app.debug = True if "DEBUG" in environ and environ["DEBUG"] else False app.config['SECRET_KEY'] = urandom(16)
login_manager = LoginManager() login_manager = LoginManager()
login_manager.init_app(app) login_manager.init_app(app)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment