From c62843a006b2f32d7bdaa6c418cc6c1c29880d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sat, 2 Sep 2023 19:25:02 +0200 Subject: [PATCH 1/3] chore: optimizing image --- Dockerfile | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 26a93af..0f9eaa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,9 @@ -# Pull base image -#TODO better base image and structure -FROM ubuntu:22.04 +FROM python:3.10-slim # Labels -LABEL MAINTAINER="Øyvind Nilsen " +LABEL MAINTAINER="Jan-Ole Hübner " -# Setup external package-sources -RUN apt-get update && apt-get install -y \ - python3 \ - python3-dev \ - python3-setuptools \ - python3-pip \ - gcc \ - --no-install-recommends && \ - rm -rf /var/lib/apt/lists/* -# Run pip install -RUN pip install pytz --upgrade -RUN pip install tzdata --upgrade ADD requirenments.txt / RUN pip3 install -r /requirenments.txt # Environment From f564ccb1f0a00a3bbcf7988676ccbd4e6d0cad85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sat, 2 Sep 2023 20:16:43 +0200 Subject: [PATCH 2/3] fix: changing image tag becaus of portainer bug --- .github/workflows/docker.yml | 2 +- pulse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index edf48ff..3eea2a0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,7 +22,7 @@ jobs: if [ "${{ github.ref }}" == "refs/heads/main" ]; then DOCKER_TAG="latest" elif [ "${{ github.ref }}" == "refs/heads/dev" ]; then - DOCKER_TAG="dev" + DOCKER_TAG="development" else DOCKER_TAG="other" fi diff --git a/pulse.py b/pulse.py index de645d4..3461cb7 100644 --- a/pulse.py +++ b/pulse.py @@ -6,7 +6,7 @@ import time from dateutil.parser import parse -print("tibberpulse-influxdb") +print("tibber_v001") import tibber.const import asyncio import aiohttp From db34941c303bbfbb5afb590440c30a1efbd0724d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sat, 2 Sep 2023 20:26:46 +0200 Subject: [PATCH 3/3] fix: changing image tag becaus of portainer bug --- .gitignore | 3 ++- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e7d4a53..649f66c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ auth.env -.idea \ No newline at end of file +.idea +notes \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0f9eaa7..717c72a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ ADD pulse.py / # Chmod RUN chmod 755 /pulse.py -CMD ["/bin/python3","/pulse.py"] \ No newline at end of file +CMD ["python3","/pulse.py"] \ No newline at end of file