I’m running Rasa in docker container and then exposed port for webchat, then I made Apache virtualhost and open virtualhost website with webchat. Webcat works, the chatbot is there BUT it is full sceen mode i.e. no separate chatbot widget.
My environment:
Rasa 1.10.3
Docker version 19.03.12, build 48a66213fe
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2020-08-12T21:33:25
18.04.1-Ubuntu
Azure cloud
Here are my configuration files:
linttu@linttu-VirtualBox:/etc/apache2/sites-available$ cat userA.conf <VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName usera.com
ServerAlias www.usera.com
DocumentRoot /home/userA/public_html/
<Directory /home/userA/public_html/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
linttu@linttu-VirtualBox:/etc/apache2/sites-available$
linttu@linttu-VirtualBox:/etc/apache2/sites-available$ cat /home/userA/public_html/index.html
Webchat<body>
<div id="webchat"></div>
<script src="https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.min.js"></script>
// you can add a version tag if you need, e.g for version 0.11.5
https://cdn.jsdelivr.net/npm/rasa-webchat@0.11.5/lib/index.min.js
<script>
WebChat.default.init({
selector: "#webchat",
initPayload: "/get_started",
customData: { "language": "en" }, // arbitrary custom data. Stay minimal as this will be added to the socket
socketUrl: "http://localhost:5005",
socketPath: "/socket.io/",
embedded: true,
title: "Welcome",
subtitle: "to my chatbot",
params: { "storage": "session" } // can be set to "local" or "session". details in storage section.
})
</script>
</body>