Skip to content
Snippets Groups Projects
Commit de0f0bd9 authored by Jan Hartig's avatar Jan Hartig
Browse files

Merge branch 'develop' into 'main'

Get URL from environment variable

See merge request !16
parents ed63a326 a928abcb
No related branches found
No related tags found
1 merge request!16Get URL from environment variable
Pipeline #17773 passed
...@@ -17,8 +17,9 @@ services: ...@@ -17,8 +17,9 @@ services:
- 8000:8000 - 8000:8000
environment: environment:
- TZ=Europe/Berlin - TZ=Europe/Berlin
- SANIC_JITSI_APP_ID= - SANIC_JITSI_PUBLIC_URL=vc.ptb.de
- SANIC_JITSI_APP_SECRET= - SANIC_JITSI_APP_ID=MY_APP_ID
- SANIC_JITSI_APP_SECRET=MY_VERY_SECURE_SECRET
- SANIC_TOKEN_VALID_FOR=15 - SANIC_TOKEN_VALID_FOR=15
volumes: volumes:
- /path/to/serial2room.json:/data/serial2room.json:ro - /path/to/serial2room.json:/data/serial2room.json:ro
......
...@@ -15,6 +15,7 @@ app = Sanic(__name__) ...@@ -15,6 +15,7 @@ app = Sanic(__name__)
''' Config ### ''' Config ###
Set via environment variable Set via environment variable
SANIC_JITSI_PUBLIC_URL: vc.ptb.de
SANIC_JITSI_APP_ID SANIC_JITSI_APP_ID
SANIC_JITSI_APP_SECRET: Jitsi App Secret SANIC_JITSI_APP_SECRET: Jitsi App Secret
SANIC_TOKEN_VALID_FOR: Time in seconds generated JWT will be valid for SANIC_TOKEN_VALID_FOR: Time in seconds generated JWT will be valid for
...@@ -91,7 +92,7 @@ def gen_jwt(room): ...@@ -91,7 +92,7 @@ def gen_jwt(room):
claims = json.dumps({ claims = json.dumps({
"context": {}, # Setting name and email here leads to auth failure "context": {}, # Setting name and email here leads to auth failure
"iss": app.config.JITSI_APP_ID, "iss": app.config.JITSI_APP_ID,
"sub": 'vc.ptb.de', "sub": app.config.JITSI_PUBLIC_URL,
"iat": now, "iat": now,
"nbf": now, "nbf": now,
"exp": now + app.config.TOKEN_VALID_FOR, "exp": now + app.config.TOKEN_VALID_FOR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment