Black Lives Matter · Supporting the cause ·
Use make commands to check_environment, install_requirements, lint, test, migrate, start, migrations and collectstatic.
| Command | Description |
|---|---|
| make help | Show make commands help |
| make check_environment | Check if all dependencies was installed |
| make install_requirements | Install pip dependencies |
| make lint | Show lint warnings and errors |
| make test | Run unit tests and show coverage report |
| make migrate | Update DB shema, apply migrations |
| make start | Start development web server |
| make start_celery | Start celery service |
| make migrations | Create DB migrations files |
| make collectstatic | Collects the static files into STATIC_ROOT |
Run pipenv run python ./manage.py fill_db_using_fake_data to fill database using fake data. This can help you to test Bothub Webapp.
Run pipenv run python ./manage.py transfer_train_aws Migrate all trainings to an aws bucket defined in project settings.
Run pipenv run python ./manage.py enable_all_train
Run pipenv run python ./manage.py start_all_repository_train
| nickname | password | is superuser | |
|---|---|---|---|
| admin | [email protected] | admin | yes |
| user | [email protected] | user | no |
Docker images available in Bothub's Docker Hub repository.
Host your own Bothub Engine with [One-Click Deploy] (https://heroku.com/deploy).
You can set environment variables in your OS, write on .env file or pass via Docker config.
| Variable | Type | Default | Description |
|---|---|---|---|
| SECRET_KEY | string | None | A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. |
| DEBUG | boolean | False | A boolean that turns on/off debug mode. |
| BASE_URL | string | http://api.bothub.it | URL Base Bothub Engine Backend. |
| ALLOWED_HOSTS | string | * | A list of strings representing the host/domain names that this Django site can serve. |
| DEFAULT_DATABASE | string | sqlite:///db.sqlite3 | Read dj-database-url to configure the database connection. |
| LANGUAGE_CODE | string | en-us | A string representing the language code for this installation.This should be in standard language ID format. |
| TIME_ZONE | string | UTC | A string representing the time zone for this installation. See the list of time zones. |
| STATIC_URL | string | /static/ | URL to use when referring to static files located in STATIC_ROOT. |
| EMAIL_HOST | string | None | The host to use for sending email. When setted to None or empty string, the EMAIL_BACKEND setting is setted to django.core.mail.backends.console.EmailBackend |
| EMAIL_PORT | int | 25 | Port to use for the SMTP server defined in EMAIL_HOST. |
| DEFAULT_FROM_EMAIL | string | webmaster@localhost | Default email address to use for various automated correspondence from the site manager(s). |
| SERVER_EMAIL | string | root@localhost | The email address that error messages come from, such as those sent to ADMINS and MANAGERS. |
| EMAIL_HOST_USER | string | '' | Username to use for the SMTP server defined in EMAIL_HOST. |
| EMAIL_HOST_PASSWORD | string | '' | Password to use for the SMTP server defined in EMAIL_HOST. |
| EMAIL_USE_SSL | boolean | False | Whether to use an implicit TLS (secure) connection when talking to the SMTP server. |
| EMAIL_USE_TLS | boolean | False | Whether to use a TLS (secure) connection when talking to the SMTP server. |
| ADMINS | string | '' | A list of all the people who get code error notifications. Follow the pattern: [email protected]|Admin 1,[email protected]|Admin 2 |
| CSRF_COOKIE_DOMAIN | string | None | The domain to be used when setting the CSRF cookie. |
| CSRF_COOKIE_SECURE | boolean | False | Whether to use a secure cookie for the CSRF cookie. |
| BOTHUB_WEBAPP_BASE_URL | string | http://localhost:8080/ | The bothub-webapp production application URL. Used to refer and redirect user correctly. |
| SUPPORTED_LANGUAGES | string | ```en | pt``` |
| BOTHUB_NLP_BASE_URL | string | http://localhost:2657/ | The bothub-blp production application URL. Used to proxy requests. |
| CHECK_ACCESSIBLE_API_URL | string | http://localhost/api/repositories/ | URL used by bothub.health.check.check_accessible_api to make a HTTP request. The response status code must be 200. |
| SEND_EMAILS | boolean | True | Send emails flag. |
| BOTHUB_ENGINE_AWS_S3_BUCKET_NAME | string | None | Specify the bucket name to send to s3 |
| BOTHUB_ENGINE_AWS_ACCESS_KEY_ID | string | None | Specify the access key to send to s3 |
| BOTHUB_ENGINE_AWS_SECRET_ACCESS_KEY | string | None | Specify the secret access key to send to s3 |
| BOTHUB_ENGINE_AWS_REGION_NAME | string | None | Specify the region to send to s3 |
| BOTHUB_ENGINE_AWS_ENDPOINT_URL | string | None | Specify the endpoint to send to s3, if sending to amazon s3, there is no need to specify a value |
| BOTHUB_ENGINE_AWS_SEND | bool | False | Authorize sending to s3 |
| BOTHUB_BOT_EMAIL | string | [email protected] | Email that the system will automatically create for existing repositories that the owner deleted the account |
| BOTHUB_BOT_NAME | string | Bot Repository | Name that the system will use to create the account |
| BOTHUB_BOT_NICKNAME | string | bot_repository | Nickname that the system will use to create the account |
| BOTHUB_ENGINE_USE_SENTRY | bool | False | Enable Support Sentry |
| BOTHUB_ENGINE_SENTRY | string | None | URL Sentry |
| BOTHUB_NLP_RASA_VERSION | string | 1.4.3 | Specify the version of rasa used in the nlp worker |
| TOKEN_SEARCH_REPOSITORIES | string | None | Specify the token to be used in the search_repositories_examples route, if not specified, the route is available without authentication |
| GOOGLE_API_TRANSLATION_KEY | string | None | Specify the Google Translation API passkey, used in machine translation |
| APM_DISABLE_SEND | bool | False | Disable sending Elastic APM |
| APM_SERVICE_DEBUG | bool | False | Enable APM debug mode |
| APM_SERVICE_NAME | string | '' | APM Service Name |
| APM_SECRET_TOKEN | string | '' | APM Secret Token |
| APM_SERVER_URL | string | '' | APM URL |
| APM_SERVICE_ENVIRONMENT | string | '' | Environment that APM is running on |
| ENVIRONMENT | string | production | Specify the environment you are going to run, it is also used for sentry |
| SUGGESTION_LANGUAGES | string | ```en | pt_br``` |
| N_WORDS_TO_GENERATE | int | 4 | Specify the number of suggestions that will be returned for word suggestions |
| N_SENTENCES_TO_GENERATE | int | 10 | Specify the number of suggestions that will be returned for intent suggestions |
| REDIS_TIMEOUT | int | 3600 | Specify a systemwide Redis keys life time |
| SECRET_KEY_CHECK_LEGACY_USER | string | None | Enables and specifies the token to use for the legacy user endpoint. |
| OIDC_ENABLED | bool | False | Enable using OIDC. |
| OIDC_RP_CLIENT_ID | string | None | OpenID Connect client ID provided by your OP. |
| OIDC_RP_CLIENT_SECRET | string | None | OpenID Connect client secret provided by your OP. |
| OIDC_OP_AUTHORIZATION_ENDPOINT | string | None | URL of your OpenID Connect provider authorization endpoint. |
| OIDC_OP_TOKEN_ENDPOINT | string | None | URL of your OpenID Connect provider token endpoint. |
| OIDC_OP_USER_ENDPOINT | string | None | URL of your OpenID Connect provider userinfo endpoint. |
| OIDC_OP_JWKS_ENDPOINT | string | None | URL of your OpenID Connect provider JWKS endpoint. |
| OIDC_RP_SIGN_ALGO | string | RS256 | Sets the algorithm the IdP uses to sign ID tokens. |
| OIDC_DRF_AUTH_BACKEND | string | bothub.authentication.authorization.WeniOIDCAuthenticationBackend | Define the authentication middleware for the django rest framework. |
| OIDC_RP_SCOPES | string | openid email | The OpenID Connect scopes to request during login. |
| CONNECT_GRPC_SERVER_URL | string | localhost:8002 | Define grpc connect server url |
| CONNECT_CERTIFICATE_GRPC_CRT | string | None | Absolute certificate path for secure grpc communication |
| RECAPTCHA_SECRET_KEY | string | '' | Token of the recaptcha used in the validation of a user's registration. |
| REPOSITORY_NLP_LOG_LIMIT | int | 10000 | Limit of query size to repository log |
| REPOSITORY_RESTRICT_ACCESS_NLP_LOGS | list | [] | Restricts log access to a particular or multiple intelligences |
See the open issues for a list of proposed features (and known issues).
Distributed under the GPL-3.0 License. See LICENSE for more information.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Content type
Image
Digest
sha256:61ed328a9…
Size
826.9 MB
Last updated
about 2 years ago
docker pull bothubit/bothub-engine:6.16.0