diff --git a/DataScraper/DOCKERFILE b/DataScraper/DOCKERFILE deleted file mode 100644 index b151fbc..0000000 --- a/DataScraper/DOCKERFILE +++ /dev/null @@ -1,21 +0,0 @@ -# Use the official Python image as a base image -FROM python:3.11-bullseye - -# Set the working directory in the container -WORKDIR /app - -# Copy the script1.py and any other necessary files -COPY ./main.py /app/ - -# Install any dependencies -RUN apt-get update && apt-get install -y \ - dbus \ - bluetooth - - -RUN pip3 install --no-cache-dir bleak - -# Set the entry point -COPY entrypoint.sh . -RUN ["chmod", "+x", "./entrypoint.sh"] -CMD ./entrypoint.sh \ No newline at end of file diff --git a/DataScraper/entrypoint.sh b/DataScraper/entrypoint.sh deleted file mode 100644 index 8d9af51..0000000 --- a/DataScraper/entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -service dbus start -service bluetooth start -python3 ./main.py \ No newline at end of file diff --git a/DataScraper/main.py b/DataScraper/main.py deleted file mode 100644 index 0d0137b..0000000 --- a/DataScraper/main.py +++ /dev/null @@ -1,9 +0,0 @@ -import asyncio -from bleak import BleakScanner - -async def main(): - devices = await BleakScanner.discover() - for d in devices: - print(d) - -asyncio.run(main()) \ No newline at end of file diff --git a/Schematics/howdoesitwork.d2 b/Schematics/howdoesitwork.d2 index 21bbfe5..df1633e 100644 --- a/Schematics/howdoesitwork.d2 +++ b/Schematics/howdoesitwork.d2 @@ -1,20 +1,18 @@ hst : "host" { - Dck : "Stack Docker Compose" { - DB :"MariaDB" { + PythonSRV : "Stack Python" { + DB :"SQLite DB" { icon : https://icons.terrastruct.com/azure%2FDatabases%20Service%20Color%2FAzure%20Database%20for%20MariaDB%20servers.svg } Scrp : "DataScrapper" { icon : https://icons.terrastruct.com/dev%2Fpython.svg - explaination : |md - Containerized python + explaination : |md used to scrap data from bluetooth | } web : "WebGui" { icon : https://icons.terrastruct.com/dev%2Fpython.svg - explaination : |md - Containerized python + explaination : |md used to display data from DB | } @@ -28,7 +26,7 @@ PC : "User browser"{ icon : https://icons.terrastruct.com/essentials%2F365-user.svg } -hst.Dck.DB <-- hst.Dck.Scrp : "Write \ndata" { +hst.PythonSRV.DB <-- hst.PythonSRV.Scrp : "Write \ndata" { style : { stroke-dash: 5 animated: true @@ -36,7 +34,7 @@ hst.Dck.DB <-- hst.Dck.Scrp : "Write \ndata" { } } -hst.Dck.DB --> hst.Dck.web : "Read \nData" { +hst.PythonSRV.DB --> hst.PythonSRV.web : "Read \nData" { style : { stroke-dash: 5 animated: true @@ -44,13 +42,13 @@ hst.Dck.DB --> hst.Dck.web : "Read \nData" { } } -sens --> hst.blt --> hst.Dck.scrp : "Read \nData" { +sens --> hst.blt --> hst.PythonSRV.scrp : "Read \nData" { style : { stroke-dash: 5 animated: true } } -hst.Dck.web --> pc : "display \ndata" { +hst.PythonSRV.web --> pc : "display \ndata" { style : { stroke-dash: 5 animated: true @@ -58,7 +56,7 @@ hst.Dck.web --> pc : "display \ndata" { } } -hst.Dck.web <-- pc : "write \nsettings" { +hst.PythonSRV.web <-- pc : "write \nsettings" { style : { stroke-dash: 5 animated: true @@ -66,7 +64,7 @@ hst.Dck.web <-- pc : "write \nsettings" { } } -hst.Dck.DB <-- hst.Dck.web : "write \nsettings" { +hst.PythonSRV.DB <-- hst.PythonSRV.web : "write \nsettings" { style : { stroke-dash: 5 animated: true @@ -74,7 +72,7 @@ hst.Dck.DB <-- hst.Dck.web : "write \nsettings" { } } -hst.Dck.DB --> hst.Dck.Scrp : "Read \nsettings" { +hst.PythonSRV.DB --> hst.PythonSRV.Scrp : "Read \nsettings" { style : { stroke-dash: 5 animated: true diff --git a/WebGui/DOCKERFILE b/WebGui/DOCKERFILE deleted file mode 100644 index 6f8012a..0000000 --- a/WebGui/DOCKERFILE +++ /dev/null @@ -1,17 +0,0 @@ -# Use the official Python image as a base image -FROM python:3.11-bullseye - -# Set the working directory in the container -WORKDIR /app - -# Copy the script1.py and any other necessary files -COPY ./Helloworld.py /app/ - -#expose port -EXPOSE 5000 - -# Install any dependencies -RUN pip3 install --no-cache-dir flask - -# Set the entry point -CMD ["python", "Helloworld.py"] diff --git a/WebGui/Helloworld.py b/WebGui/Helloworld.py deleted file mode 100644 index 57c26a7..0000000 --- a/WebGui/Helloworld.py +++ /dev/null @@ -1,10 +0,0 @@ -from flask import Flask - -app = Flask(__name__) - -@app.route('/') -def hello_world(): - return 'Hello, World!' - -if __name__ == '__main__': - app.run(debug=True) diff --git a/WebGui/requirements.txt b/WebGui/requirements.txt deleted file mode 100644 index 7d47fc5..0000000 --- a/WebGui/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -Flask==2.1.2 diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index e515a2a..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: '3' - -services: - data-scraper: - build: - context: ./DataScraper - dockerfile: ./DOCKERFILE - privileged: true - volumes: - - /run/dbus:/run/dbus:ro - - web-gui: - build: - context: ./WebGui - dockerfile: ./DOCKERFILE - ports: - - '8080:5000' - - - database: - image: mariadb - environment: - MYSQL_ROOT_PASSWORD: password - MYSQL_DATABASE: mydatabase - MYSQL_USER: user - MYSQL_PASSWORD: password - volumes: - - data:/var/lib/mysql - ports: - - "3306:3306" - -volumes: - data: \ No newline at end of file