Fixed database packages and added Dockerfile
This commit is contained in:
parent
0b6381e2e1
commit
d28244f425
@ -2,6 +2,6 @@ pyTelegramBotAPI~=4.5.0
|
|||||||
python-dotenv~=0.20.0
|
python-dotenv~=0.20.0
|
||||||
APScheduler~=3.9.1
|
APScheduler~=3.9.1
|
||||||
SQLAlchemy~=1.4.36
|
SQLAlchemy~=1.4.36
|
||||||
mysqlclient~=1.4.6
|
pymysql==1.0.2
|
||||||
requests~=2.27.1
|
requests~=2.27.1
|
||||||
beautifulsoup4~=4.9.1
|
beautifulsoup4~=4.9.1
|
@ -2,4 +2,4 @@
|
|||||||
BOT_API_KEY=
|
BOT_API_KEY=
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
DATABASE_CONNECTION=mysql://scott:tiger@localhost/foo
|
DATABASE_CONNECTION=mysql+pymysql://scott:tiger@localhost/foo
|
17
source/Dockerfile
Normal file
17
source/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM python:3.10-slim
|
||||||
|
|
||||||
|
# Change the working directory to the root of the project
|
||||||
|
WORKDIR /srv/flask_app
|
||||||
|
|
||||||
|
# Install the dependencies
|
||||||
|
COPY requirements.txt /srv/flask_app/
|
||||||
|
RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-location
|
||||||
|
|
||||||
|
# Copy the source code to the working directory
|
||||||
|
COPY source /srv/flask_app
|
||||||
|
|
||||||
|
# Change file permissions
|
||||||
|
RUN chmod +x ./deploy/start.sh
|
||||||
|
|
||||||
|
# Run the app
|
||||||
|
CMD ["./deploy/start.sh"]
|
3
source/deploy/start.sh
Normal file
3
source/deploy/start.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
python bot.py
|
Loading…
Reference in New Issue
Block a user