new file: requirements.txt
modified: src/Dockerfile modified: src/config.yaml modified: src/run.sh
This commit is contained in:
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
BIN
requirements.txt
Normal file
BIN
requirements.txt
Normal file
Binary file not shown.
@@ -2,18 +2,23 @@ ARG BUILD_FROM
|
|||||||
FROM $BUILD_FROM
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
RUN apk add --no-cache python3
|
RUN apk add --no-cache python3
|
||||||
RUN apk add --update py3-pip
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
# Copy data for add-on
|
# Copy data for add-on
|
||||||
COPY run.sh /
|
COPY run.sh .
|
||||||
COPY run.py /
|
COPY run.py .
|
||||||
COPY requirements.txt /
|
COPY main.py .
|
||||||
COPY main.py /
|
COPY api.py .
|
||||||
COPY api.py /
|
COPY moj_licznik.py .
|
||||||
COPY moj_licznik.py /
|
COPY log_config.py .
|
||||||
COPY log_config.py /
|
COPY database_empty.sqlite database.sqlite
|
||||||
COPY database_empty.sqlite /database.sqlite
|
RUN chmod a+x run.sh
|
||||||
RUN chmod a+x /run.sh
|
|
||||||
RUN pip install -r requirements.txt
|
|
||||||
|
|
||||||
CMD [ "/run.sh" ]
|
RUN apk add --update --no-cache py3-pip && \
|
||||||
|
python3 -m venv /app/venv && \
|
||||||
|
source /app/venv/bin/activate && \
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
CMD [ "/app/run.sh" ]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: "Energa meter"
|
name: "Energa meter"
|
||||||
description: "Energa meter addon"
|
description: "Energa meter addon"
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
slug: "energa_meter"
|
slug: "energa_meter"
|
||||||
init: false
|
init: false
|
||||||
options:
|
options:
|
||||||
|
|||||||
@@ -5,5 +5,6 @@ export PASSWORD=$(bashio::config 'energa_password')
|
|||||||
export LOG_LEVEL=$(bashio::config 'log_level')
|
export LOG_LEVEL=$(bashio::config 'log_level')
|
||||||
|
|
||||||
bashio::log.info "Uruchamiam API"
|
bashio::log.info "Uruchamiam API"
|
||||||
|
source /app/venv/bin/activate
|
||||||
python run.py
|
python run.py
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user