Compare commits
2 commits
c65a9e472b
...
cb451f02af
Author | SHA1 | Date | |
---|---|---|---|
cb451f02af | |||
01b34783cf |
2 changed files with 15 additions and 3 deletions
14
README.md
14
README.md
|
@ -6,10 +6,22 @@ The bot calls the Api and sends the invitation link via e-mail to a given receip
|
|||
|
||||
## Usage
|
||||
|
||||
Use container image or run this after cloning:
|
||||
Use container image or run this after cloning. In both cases you need to create a `.env` file containing the matrix and mail server credentials:
|
||||
|
||||
```
|
||||
cp. .env.example .env
|
||||
```
|
||||
|
||||
If you want to run it without the container you can run it like this:
|
||||
|
||||
|
||||
```
|
||||
. bin/activate
|
||||
python -m matrix_bot_invitation_mailer
|
||||
```
|
||||
|
||||
And for use with docker run it like this:
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
|
|
@ -117,9 +117,9 @@ The link will be valid for 7 days.""".format(os.getenv("REGISTRATION_URL") + res
|
|||
while True:
|
||||
try:
|
||||
bot.run()
|
||||
except ServerDisconnectedError:
|
||||
time.sleep(5)
|
||||
except (ServerDisconnectedError, ValueError):
|
||||
logging.info("connection lost, reconnecting in 5 seconds...")
|
||||
time.sleep(5)
|
||||
except KeyboardInterrupt:
|
||||
logging.info("exiting...")
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Reference in a new issue