Init
Creation of dokerfiles for scraper and webgui.
This commit is contained in:
parent
471dbd6561
commit
bd7021fa85
14
DataScraper/DOCKERFILE_DataScraper
Normal file
14
DataScraper/DOCKERFILE_DataScraper
Normal file
@ -0,0 +1,14 @@
|
||||
# Use the official Python image as a base image
|
||||
FROM python:3.8-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the script1.py and any other necessary files
|
||||
COPY Helloworld.py /app/
|
||||
|
||||
# Install any dependencies specific to script1.py
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Set the entry point
|
||||
CMD ["python", "Helloworld.py"]
|
||||
1
DataScraper/Helloworld.py
Normal file
1
DataScraper/Helloworld.py
Normal file
@ -0,0 +1 @@
|
||||
print('HelloWorld')
|
||||
0
Install.sh
Normal file
0
Install.sh
Normal file
14
WebGui/DOCKERFILE_webgui
Normal file
14
WebGui/DOCKERFILE_webgui
Normal file
@ -0,0 +1,14 @@
|
||||
# Use the official Python image as a base image
|
||||
FROM python:3.8-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the script1.py and any other necessary files
|
||||
COPY Helloworld.py /app/
|
||||
|
||||
# Install any dependencies specific to script1.py
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Set the entry point
|
||||
CMD ["python", "Helloworld.py"]
|
||||
10
WebGui/Helloworld.py
Normal file
10
WebGui/Helloworld.py
Normal file
@ -0,0 +1,10 @@
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello_world():
|
||||
return 'Hello, World!'
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
1
WebGui/requirements.txt
Normal file
1
WebGui/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
Flask==2.1.2
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
DataScraper:
|
||||
build:
|
||||
context: ./DataScraper
|
||||
dockerfile: Dockerfile_DataScraper
|
||||
|
||||
WebGui:
|
||||
build:
|
||||
context: ./WebGui
|
||||
dockerfile: Dockerfile_webgui
|
||||
Loading…
Reference in New Issue
Block a user