scraper shellscript + dockerfile improvements
This commit is contained in:
parent
ba630c381f
commit
5b16fff0bd
@ -1,5 +1,5 @@
|
|||||||
FROM python:3.9-slim-bullseye
|
FROM python:3.9-slim-bullseye as development
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /app
|
||||||
RUN apt-get -y update && apt-get install -yqq dos2unix chromium chromium-driver \
|
RUN apt-get -y update && apt-get install -yqq dos2unix chromium chromium-driver \
|
||||||
libxi6 libgconf-2-4 python3-selenium \
|
libxi6 libgconf-2-4 python3-selenium \
|
||||||
tzdata git
|
tzdata git
|
||||||
@ -8,3 +8,10 @@ RUN python3 -m pip install --upgrade pip
|
|||||||
RUN python3 -m pip install --user virtualenv
|
RUN python3 -m pip install --user virtualenv
|
||||||
ENV TZ=Europe/Berlin
|
ENV TZ=Europe/Berlin
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
|
FROM development
|
||||||
|
COPY ../inkycal/modules/inkycal_openweather_scrape.py /app/
|
||||||
|
COPY ./run_weather_scraper.sh /app/
|
||||||
|
|
||||||
|
# Set the entrypoint to the shell script
|
||||||
|
ENTRYPOINT ["run_weather_scraper.sh"]
|
@ -2,7 +2,8 @@
|
|||||||
{
|
{
|
||||||
"name": "Inkycal-dev",
|
"name": "Inkycal-dev",
|
||||||
"build": {
|
"build": {
|
||||||
"dockerfile": "Dockerfile"
|
"dockerfile": "Dockerfile",
|
||||||
|
"target": "development"
|
||||||
},
|
},
|
||||||
|
|
||||||
// This is the settings.json mount
|
// This is the settings.json mount
|
||||||
|
3
run_weather_scraper.sh
Executable file
3
run_weather_scraper.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
python3 /home/ubuntu/Inkycal/inkycal/modules/inkycal_openweather_scrape.py
|
||||||
|
scp ./openweather_scraped.png inky@10.10.9.10:~/Inkycal/
|
Loading…
Reference in New Issue
Block a user