Delete all docker related files
Update schematics
This commit is contained in:
parent
4af0334254
commit
ecfb5ed503
@ -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
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
service dbus start
|
|
||||||
service bluetooth start
|
|
||||||
python3 ./main.py
|
|
||||||
@ -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())
|
|
||||||
@ -1,12 +1,11 @@
|
|||||||
hst : "host" {
|
hst : "host" {
|
||||||
Dck : "Stack Docker Compose" {
|
PythonSRV : "Stack Python" {
|
||||||
DB :"MariaDB" {
|
DB :"SQLite DB" {
|
||||||
icon : https://icons.terrastruct.com/azure%2FDatabases%20Service%20Color%2FAzure%20Database%20for%20MariaDB%20servers.svg
|
icon : https://icons.terrastruct.com/azure%2FDatabases%20Service%20Color%2FAzure%20Database%20for%20MariaDB%20servers.svg
|
||||||
}
|
}
|
||||||
Scrp : "DataScrapper" {
|
Scrp : "DataScrapper" {
|
||||||
icon : https://icons.terrastruct.com/dev%2Fpython.svg
|
icon : https://icons.terrastruct.com/dev%2Fpython.svg
|
||||||
explaination : |md
|
explaination : |md
|
||||||
Containerized python
|
|
||||||
used to scrap data from bluetooth
|
used to scrap data from bluetooth
|
||||||
|
|
|
|
||||||
|
|
||||||
@ -14,7 +13,6 @@ hst : "host" {
|
|||||||
web : "WebGui" {
|
web : "WebGui" {
|
||||||
icon : https://icons.terrastruct.com/dev%2Fpython.svg
|
icon : https://icons.terrastruct.com/dev%2Fpython.svg
|
||||||
explaination : |md
|
explaination : |md
|
||||||
Containerized python
|
|
||||||
used to display data from DB
|
used to display data from DB
|
||||||
|
|
|
|
||||||
}
|
}
|
||||||
@ -28,7 +26,7 @@ PC : "User browser"{
|
|||||||
icon : https://icons.terrastruct.com/essentials%2F365-user.svg
|
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 : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
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 : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
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 : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
animated: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hst.Dck.web --> pc : "display \ndata" {
|
hst.PythonSRV.web --> pc : "display \ndata" {
|
||||||
style : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
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 : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
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 : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
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 : {
|
style : {
|
||||||
stroke-dash: 5
|
stroke-dash: 5
|
||||||
animated: true
|
animated: true
|
||||||
|
|||||||
@ -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"]
|
|
||||||
@ -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)
|
|
||||||
@ -1 +0,0 @@
|
|||||||
Flask==2.1.2
|
|
||||||
@ -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:
|
|
||||||
Loading…
Reference in New Issue
Block a user