From 02146d6ab55c7220568b5b31e0140671d9442cad Mon Sep 17 00:00:00 2001 From: James Jennett-Wheeler Date: Mon, 23 Jun 2025 11:39:56 +0100 Subject: [PATCH] Fix db location --- Dockerfile | 4 +--- app/monitor-planning.py | 4 ++-- app/scrape-my-application.py | 2 +- app/scrape-new-applications.py | 2 +- app/search-db.py | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f63a87..91e63ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,4 @@ WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt -COPY app/ ./ - -CMD "python3 /usr/src/app/monitor-planning.py" \ No newline at end of file +COPY app/ ./ \ No newline at end of file diff --git a/app/monitor-planning.py b/app/monitor-planning.py index c48d679..232f22a 100644 --- a/app/monitor-planning.py +++ b/app/monitor-planning.py @@ -66,13 +66,13 @@ def update_other_applications(): if __name__ == '__main__': try: - with sqlite3.connect("../database.db") as connection: + with sqlite3.connect("./database.db") as connection: cursor = connection.cursor() Application.CreateTableIfNotExists(cursor, reset_table) midday_checked = False while True: - with sqlite3.connect("../database.db") as connection: + with sqlite3.connect("./database.db") as connection: application = Application(connection.cursor(), "25/00605/FUL") with webdriver.Chrome(options=web_opts) as browser: diff --git a/app/scrape-my-application.py b/app/scrape-my-application.py index 472e14e..f258194 100644 --- a/app/scrape-my-application.py +++ b/app/scrape-my-application.py @@ -17,7 +17,7 @@ api_url = 'https://hass.jennett-wheeler.co.uk/api/webhook/-Qx6jHsGLHwbBlJpLek5Nj if __name__ == '__main__': try: - with sqlite3.connect("../database.db") as connection: + with sqlite3.connect("./database.db") as connection: cursor = connection.cursor() options = webdriver.ChromeOptions() diff --git a/app/scrape-new-applications.py b/app/scrape-new-applications.py index 3fe00a0..f7e9013 100644 --- a/app/scrape-new-applications.py +++ b/app/scrape-new-applications.py @@ -16,7 +16,7 @@ TAG_RE = re.compile(r'<[^>]+>') if __name__ == '__main__': try: - with sqlite3.connect("../database.db") as connection: + with sqlite3.connect("./database.db") as connection: cursor = connection.cursor() Application.CreateTableIfNotExists(cursor, reset_table) diff --git a/app/search-db.py b/app/search-db.py index 1e6cf7d..c1747bb 100644 --- a/app/search-db.py +++ b/app/search-db.py @@ -2,7 +2,7 @@ from application import Application import sqlite3 -with sqlite3.connect("../database.db") as connection: +with sqlite3.connect("./database.db") as connection: cursor = connection.cursor() applications = []