🚚 Make session persistent
This commit is contained in:
parent
9eb1a75baf
commit
d6792c91a8
3 changed files with 8 additions and 1 deletions
|
@ -8,3 +8,5 @@ services:
|
||||||
- BOT_HOMESERVER
|
- BOT_HOMESERVER
|
||||||
- BOT_USERNAME
|
- BOT_USERNAME
|
||||||
- BOT_PASSWORD
|
- BOT_PASSWORD
|
||||||
|
volumes:
|
||||||
|
- ./data/:/bot/data
|
||||||
|
|
4
data/.gitignore
vendored
Normal file
4
data/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
|
@ -12,7 +12,8 @@ load_dotenv()
|
||||||
creds = botlib.Creds(
|
creds = botlib.Creds(
|
||||||
os.getenv("BOT_HOMESERVER"),
|
os.getenv("BOT_HOMESERVER"),
|
||||||
os.getenv("BOT_USERNAME"),
|
os.getenv("BOT_USERNAME"),
|
||||||
os.getenv("BOT_PASSWORD")
|
os.getenv("BOT_PASSWORD"),
|
||||||
|
session_stored_file="data/session.txt"
|
||||||
)
|
)
|
||||||
|
|
||||||
bot = botlib.Bot(creds)
|
bot = botlib.Bot(creds)
|
||||||
|
|
Loading…
Reference in a new issue