Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ ETHPLORER_API_KEY = ""
CURRENCY = ""
RUNTIME_ENVIRONMENT = "DEV"
WEBHOOK_SECRET_TOKEN = ""
REDIS_PASSWORD = ""
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from fastapi.responses import JSONResponse
from services.notification import NotificationService

redis = Redis()
redis = Redis(password=config.REDIS_PASSWORD)
bot = Bot(TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML))
dp = Dispatcher(storage=RedisStorage(redis))
app = FastAPI()
Expand Down
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
ETHPLORER_API_KEY = os.environ.get("ETHPLORER_API_KEY")
CURRENCY = Currency(os.environ.get("CURRENCY"))
WEBHOOK_SECRET_TOKEN = os.environ.get("WEBHOOK_SECRET_TOKEN")
REDIS_PASSWORD = os.environ.get("REDIS_PASSWORD")
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ services:
redis:
image: redis:latest
container_name: redis
command:
- /bin/sh
- -c
- redis-server --requirepass "$${REDIS_PASSWORD:?REDIS_PASSWORD variable is not set}"
ports:
- "6379:6379"
env_file:
- .env
volumes:
- redis_data:/data
restart: always
Expand Down
Loading