Skip to content

Commit

Permalink
Merge pull request #315 from CarmineOptions/feat/add-new-notification…
Browse files Browse the repository at this point in the history
…-dev-container

Feat/add new notification dev container
  • Loading branch information
djeck1432 authored Nov 24, 2024
2 parents 7a3bb17 + 0bc9a70 commit 8541e97
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions apps/web_app/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DERISK_API_URL=#

ENV=dev
# PostgreSQL
DB_USER=postgres
DB_PASSWORD=password
DB_NAME=web_app
DB_HOST=db
DB_PORT=5432

TELEGRAM_TOKEN=#

DATA_HANDLER_URL=http://localhost:5000
6 changes: 4 additions & 2 deletions apps/web_app/telegram/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import asyncio

from aiogram.types import BotCommand, BotCommandScopeDefault
Expand All @@ -24,5 +25,6 @@ async def bot_start_polling():


if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(bot_start_polling())
if os.getenv("ENV") == "DEV":
loop = asyncio.get_event_loop()
loop.run_until_complete(bot_start_polling())
2 changes: 1 addition & 1 deletion devops/dev/docker-compose.notification-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
volumes:
- ../../apps/web_app:/app
env_file:
- ../../apps/web_app/.env
- ../../apps/web_app/.env.dev
expose:
- "8000"
depends_on:
Expand Down

0 comments on commit 8541e97

Please sign in to comment.