- Python 3
- Ubuntu/Linux
- PostgreSQL
- Keycloak authentication
- Janus WebRTC
docker-compose -f .docker/prod-docker-compose.yml up -d
pip3 install -r requirement.txt
Setup Keycloak and login as Administrator.
Realm common setting
- Use default Master realm or create new realm
- In General tab: setting value for Frontend URL if you want to use custom domain
- In Login tab: switch on Verify email and Login with email
- In Token tab: enable
Revoke Refresh Token
- In Email tab: setting SMTP email
Setting for client:
In menu Clients, need config for client admin-cli and client account. Get the config and fill to json config file in project:
For client admin-cli:
- In
Settings
:- Direct Access Grants Enabled: swicht ON
- Service Accounts Enabled: switch ON
- Access Type: select 'confidential'
- In section
OpenID Connect Compatibility Modes
:- Enable
Use Refresh Tokens For Client Credentials Grant
- Enable
- In
Service Account Roles
:- Assign role
manage-users
toClient Roles
realm-management
- Assign role
Need fill to the configuration file in project:
"keycloak_admin": {
"server_url": "keycloak-server-url",
"client_id": "admin-cli",
"username": "admin-user-name",
"password": "admin-password",
"realm_name": "realm-name-1",
"client_secret_key": ""
}
For client account:
- In
Settings
:- Direct Access Grants Enabled: switch ON
- Access Type: select 'confidential'
- In section
OpenID Connect Compatibility Modes
:- Enable
Use Refresh Tokens For Client Credentials Grant
- Enable
Need fill to the configuration file in project:
"keycloak_account": {
"server_url": "keycloak-server-url",
"client_id": "account",
"realm_name": "realm-name-1",
"client_secret_key": "secret-key"
}
Need to fill the configuration file in project:
"janus_webrtc": {
"admin_url": "janus-webrtc-admin-url",
"client_url" : "janus-webrtc-client-url",
"client_ws_url" : "janus-webrtc-client-ws-url",
"admin_secret": ""
}
Check configuration file of Janus docker in:
/usr/local/etc/janus/janus.jcfg
Setting stun_server in Nat
Set admin_secret and fill to configuration file
Check configuration file of Janus docker in to set path and port:
/usr/local/etc/janus/janus.transport.http.jcfg
Project required some configurations, please fill in project config file:
- Aws S3 storage
- Social login (Facebook, android, office360)
- Firebase push notification
- Stun/turn server
- OTP sender server (currently is twillio)
Genrate protobuf files:
sh proto/gen.sh
Run project
python3 app_grpc.py
python3 app_http.py