diff --git a/.env.example b/.env.example index 0dfeac3..176746a 100644 --- a/.env.example +++ b/.env.example @@ -1,9 +1,13 @@ -MYSQL_HOST= -MYSQL_PORT= -MYSQL_DATABASE= -MYSQL_USER= -MYSQL_PASSWORD= +# MYSQL Database +MYSQL_HOST= +MYSQL_PORT= +MYSQL_DATABASE= +MYSQL_USER= +MYSQL_PASSWORD= -BOT_API_KEY= +# Telegram bot api key +BOT_API_KEY= -SECRET_KEY= + +# Flask secret key +SECRET_KEY= diff --git a/.gitignore b/.gitignore index bc8a670..f5f8f89 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea/* \ No newline at end of file +.idea/* +.env \ No newline at end of file diff --git a/telegram_bot/Dockerfile b/telegram_bot/Dockerfile index 2cef589..df6b0ce 100644 --- a/telegram_bot/Dockerfile +++ b/telegram_bot/Dockerfile @@ -1,6 +1,7 @@ FROM python:3.10-alpine WORKDIR /srv/flask_app +RUN apk add build-base jpeg-dev zlib-dev musl-dev linux-headers g++ COPY telegram_bot/requirements.txt /srv/flask_app/ diff --git a/webservice/api_blueprint_portfolio.py b/webservice/api_blueprint_portfolio.py index f8a715a..6ee8a37 100644 --- a/webservice/api_blueprint_portfolio.py +++ b/webservice/api_blueprint_portfolio.py @@ -24,7 +24,7 @@ def get_portfolio(): for row in transactions: if row.symbol in return_portfolio: return_portfolio[row.symbol]['count'] += row.count - return_portfolio[row.symbol]['last_transaction'] += row.time + return_portfolio[row.symbol]['last_transaction'] = row.time else: return_portfolio[row.symbol] = {"count": row.count, "last_transaction": row.time}