New task + check on docker

This commit is contained in:
Etienne G
2023-08-15 02:12:57 +10:00
parent 61ed46ba32
commit 1c4d8f190a
6 changed files with 31 additions and 12 deletions
+12
View File
@@ -30,3 +30,15 @@ def task_copy_translations():
"file_dep": [f"{TRANSLATIONS_FOLDER}/{translation}"],
"targets": [f"{build}/translations/{translation}"],
}
def task_copy_requirements():
"""Copy requirements.txt to the builds."""
for build in BUILDS:
yield {
"name": f"copy requirements.txt to {build}",
"actions": [
f"cp requirements.txt {build}/requirements.txt",
],
"file_dep": ["requirements.txt"],
"targets": [f"{build}/requirements.txt"],
}
+5 -6
View File
@@ -12,9 +12,7 @@ ENV LANG C.UTF-8
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
RUN apk add --update --no-cache python3=3.11.4-r4 && ln -sf python3 /usr/bin/python && python3 -m ensurepip
#RUN curl -k https://codeload.github.com/johanmeijer/grott/zip/master --output files.zip && unzip files.zip
@@ -22,16 +20,17 @@ RUN pip3 install --no-cache --upgrade pip setuptools
# Copy data for add-on
COPY script.sh /app/script.sh
RUN chmod a+x script.sh
WORKDIR /app
RUN curl -Lk 'https://github.com/johanmeijer/grott/archive/refs/heads/master.zip' --output files.zip && unzip -o files.zip && rm files.zip && mv grott-*/*.py ./
# Move the addon
RUN curl -L 'https://raw.githubusercontent.com/egguy/grott/feature/ha-extension/examples/Home%20Assistent/grott_ha.py' -o grott_ha.py
COPY requirements.txt requirements.txt
#Install required python packages
RUN pip3 install paho-mqtt requests influxdb influxdb
RUN pip3 install --no-cache-dir -r requirements.txt
RUN chmod a+x script.sh
CMD [ "./script.sh" ]
# Build arguments
+3
View File
@@ -0,0 +1,3 @@
paho-mqtt==1.6.1
requests==2.31.0
influxdb==5.3.1
+5 -6
View File
@@ -12,9 +12,7 @@ ENV LANG C.UTF-8
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
RUN apk add --update --no-cache python3=3.11.4-r4 && ln -sf python3 /usr/bin/python && python3 -m ensurepip
#RUN curl -k https://codeload.github.com/johanmeijer/grott/zip/master --output files.zip && unzip files.zip
@@ -22,14 +20,15 @@ RUN pip3 install --no-cache --upgrade pip setuptools
# Copy data for add-on
COPY script.sh /app/script.sh
RUN chmod a+x script.sh
WORKDIR /app
RUN curl -Lk 'https://github.com/johanmeijer/grott/archive/refs/heads/master.zip' --output files.zip && unzip -o files.zip && rm files.zip && mv grott-*/*.py ./
# Move the addon
RUN mv grott-*/examples/Home\ Assistent/grott_ha.py ./
COPY requirements.txt requirements.txt
#Install required python packages
RUN pip install paho-mqtt requests influxdb influxdb
RUN pip3 install --no-cache-dir -r requirements.txt
RUN chmod a+x script.sh
CMD [ "./script.sh" ]
+3
View File
@@ -0,0 +1,3 @@
paho-mqtt==1.6.1
requests==2.31.0
influxdb==5.3.1
+3
View File
@@ -0,0 +1,3 @@
paho-mqtt==1.6.1
requests==2.31.0
influxdb==5.3.1