Skip to content

Commit

Permalink
Add endpoints flag to rocketchat script, and rename bot from tais to bot
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur <[email protected]>
  • Loading branch information
arthurTemporim committed Mar 15, 2019
1 parent 3071db9 commit c806b8a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,5 @@ sudo docker-compose up -d rocketchat
sudo docker-compose up -d kibana
sudo docker-compose run --rm -v $PWD/analytics:/analytics bot python /analytics/setup_elastic.py

# aguarde 3 minutos para o rocketchat terminar de levantar
sudo docker-compose up -d bot
```
4 changes: 2 additions & 2 deletions analytics/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
bot = {
'bot_url': os.getenv('BOT_URL', 'http://bot:5005/webhooks/rest/webhook'),
'rocketchat_url': os.getenv('ROCKETCHAT_URL', 'rocketchat:3000'),
'username': os.getenv('ROCKETCHAT_BOT_USERNAME', 'tais'),
'password': os.getenv('ROCKETCHAT_BOT_PASSWORD', 'tais'),
'username': os.getenv('ROCKETCHAT_BOT_USERNAME', 'bot'),
'password': os.getenv('ROCKETCHAT_BOT_PASSWORD', 'bot'),
'driver': None,
}

Expand Down
2 changes: 1 addition & 1 deletion bot/run-rocketchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run(core_dir, nlu_dir):
server_url=configs['server_url']
)

_endpoints = AvailableEndpoints.read_endpoints(None)
_endpoints = AvailableEndpoints.read_endpoints('endpoints.yml')
_interpreter = NaturalLanguageInterpreter.create(nlu_dir)

elastic_user = os.getenv('ELASTICSEARCH_USER')
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ services:
- ROCKETCHAT_URL=rocketchat:3000
- ROCKETCHAT_ADMIN_USERNAME=admin
- ROCKETCHAT_ADMIN_PASSWORD=admin
- ROCKETCHAT_BOT_USERNAME=tais
- ROCKETCHAT_BOT_PASSWORD=tais
- ROCKETCHAT_BOT_USERNAME=bot
- ROCKETCHAT_BOT_PASSWORD=bot

# Should be set to 'production' or 'beta' or 'dev'
- ENVIRONMENT_NAME=localhost
Expand Down
4 changes: 2 additions & 2 deletions docker/bot.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ env TRAINING_EPOCHS=20 \
WORDS_PER_SECOND_TYPING=5 \
ROCKETCHAT_ADMIN_USERNAME=admin \
ROCKETCHAT_ADMIN_PASSWORD=admin \
ROCKETCHAT_BOT_USERNAME=tais \
ROCKETCHAT_BOT_PASSWORD=tais \
ROCKETCHAT_BOT_USERNAME=bot \
ROCKETCHAT_BOT_PASSWORD=bot \
ENVIRONMENT_NAME=localhost \
BOT_VERSION=last-commit-hash \
ENABLE_ANALYTICS=False \
Expand Down
14 changes: 7 additions & 7 deletions scripts/bot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
parser = argparse.ArgumentParser()

parser.add_argument(
'--bot-name', '-bn', type=str, default='Tais',
help='Bot username at RocketChat(default: Tais)'
'--bot-name', '-bn', type=str, default='Bot',
help='Bot username at RocketChat(default: Bot)'
)
parser.add_argument(
'--bot-username', '-bu', type=str, default='tais',
help='Bot username at RocketChat(default: tais)'
'--bot-username', '-bu', type=str, default='bot',
help='Bot username at RocketChat(default: bot)'
)
parser.add_argument(
'--bot-password', '-bp', type=str, default='tais',
help='Bot password at RocketChat(default: tais)'
'--bot-password', '-bp', type=str, default='bot',
help='Bot password at RocketChat(default: bot)'
)
parser.add_argument(
'--bot-avatar', '-ba', type=str, default='https://raw.githubusercontent.com/lappis-unb/rouana/master/images/rouana_avatar.jpeg',
help='Bot avatar photo link (default: tais\'s github avatar)'
help='Bot avatar photo link (default: bot\'s github avatar)'
)
parser.add_argument(
'--admin-name', '-an', type=str, default='admin',
Expand Down

0 comments on commit c806b8a

Please sign in to comment.