From 4ea267bdedc9736456f1ec0f8b0c76ed3a6254e8 Mon Sep 17 00:00:00 2001 From: jwansek Date: Thu, 11 Aug 2022 18:12:29 +0000 Subject: Updated dockerfile --- Dockerfile | 4 ++-- Thumbs.db | Bin 0 -> 19456 bytes crontab | 0 database.py | 15 +++++++++++++++ docker-compose.yml | 0 requirements.txt | 3 ++- 6 files changed, 19 insertions(+), 3 deletions(-) mode change 100644 => 100755 Dockerfile create mode 100755 Thumbs.db mode change 100644 => 100755 crontab create mode 100755 database.py mode change 100644 => 100755 docker-compose.yml diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 index fb7d715..744696d --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM debian:latest MAINTAINER Eden Attenborough "eddie.atten.ea29@gmail.com" RUN apt-get update -y -RUN apt-get install -y tzdata python3-pip python-dev build-essential pkg-config cron +RUN apt-get install -y tzdata python3-pip build-essential pkg-config cron libjpeg-dev zlib1g-dev libfreetype6-dev COPY . /app WORKDIR /app COPY crontab /etc/cron.d/oad-crontab RUN chmod 0644 /etc/cron.d/oad-crontab && crontab /etc/cron.d/oad-crontab RUN pip3 install -r requirements.txt -ENTRYPOINT ["cron", "-f"] \ No newline at end of file +ENTRYPOINT ["cron", "-f"] diff --git a/Thumbs.db b/Thumbs.db new file mode 100755 index 0000000..1446464 Binary files /dev/null and b/Thumbs.db differ diff --git a/crontab b/crontab old mode 100644 new mode 100755 diff --git a/database.py b/database.py new file mode 100755 index 0000000..82c019b --- /dev/null +++ b/database.py @@ -0,0 +1,15 @@ +import pymysql +import get_images + +class Database: + def __enter__(self): + self.__connection = pymysql.connect( + **CONFIG["mysql"] + ) + return self + + def __exit__(self, type, value, traceback): + self.__connection.commit() + self.__connection.close() + + def append_black \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml old mode 100644 new mode 100755 diff --git a/requirements.txt b/requirements.txt index cc0f624..6dddbb1 100755 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,6 @@ opencv_python_headless requests==2.18.4 lxml==4.5.2 dataclasses -Pillow==7.2.0 +pillow==7.2.0 twython==3.8.2 +pymysql -- cgit v1.2.3