Skip to content

Commit

Permalink
fix ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Kopylov committed Feb 6, 2024
1 parent 9db18cb commit be82341
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ ENV PYTHONPATH=$PYTHONPATH \
WORKDIR $PYTHONPATH
COPY . .

#CMD ["python", "src/__main__.py"]
CMD ["python", "src/__main__.py"]
5 changes: 3 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- |
python -m sqlite3 ${SQLITE_DB_FILE_PATH} < src/sql/init.sql
python src/__main__.py
# restart: always
restart: always

sqlitebrowser:
image: linuxserver/sqlitebrowser
Expand All @@ -23,12 +23,13 @@ services:
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
- TZ=GMT+4
- ENABLE_UWSGI=true
volumes:
- sqlite_data:/database
profiles:
- sqlitebrowser
restart: unless-stopped

volumes:
sqlite_data:
8 changes: 3 additions & 5 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import logging
import traceback

from telegram import (
Update,
)
from telegram.ext import (
Application,
)
Expand All @@ -20,7 +17,7 @@

def main() -> None:
if not config.TELEGRAM_BOT_TOKEN:
raise ValueError("TELEGRAM_BOT_TOKEN env variable" "wasn't porpoused.")
raise ValueError("TELEGRAM_BOT_TOKEN env variable" "wasn't purposed.")

application = Application.builder().token(config.TELEGRAM_BOT_TOKEN).build()
application.add_handlers(get_handlers())
Expand All @@ -34,7 +31,8 @@ def main() -> None:
main()
except Exception:
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
level=logging.INFO,
)
logger = logging.getLogger()
logger.warning(traceback.format_exc())
Expand Down

0 comments on commit be82341

Please sign in to comment.