diff --git a/src/Dockerfile b/src/Dockerfile index 4bf9180..0365ea5 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -13,7 +13,7 @@ COPY main.py . COPY api.py . COPY moj_licznik.py . COPY log_config.py . -COPY database_empty.sqlite database.sqlite +COPY database_empty.sqlite data/database.sqlite RUN chmod a+x run.sh RUN apk add --update --no-cache py3-pip && \ diff --git a/src/api.py b/src/api.py index 522a136..d050ca5 100644 --- a/src/api.py +++ b/src/api.py @@ -11,7 +11,7 @@ logger = logging.getLogger("energaMeter.api") path = os.path.dirname(os.path.abspath(__file__)) -db_file = 'database.sqlite' +db_file = 'data/database.sqlite' db = SqliteDatabase(os.path.join(path, db_file)) app = Flask(__name__) diff --git a/src/moj_licznik.py b/src/moj_licznik.py index 301e7cb..4f17746 100644 --- a/src/moj_licznik.py +++ b/src/moj_licznik.py @@ -11,7 +11,7 @@ import urllib.parse logger = logging.getLogger("energaMeter") path = os.path.dirname(os.path.abspath(__file__)) -db_file = 'database.sqlite' +db_file = 'data/database.sqlite' db = SqliteDatabase(os.path.join(path, db_file)) class ChartType(Enum): @@ -603,4 +603,4 @@ class MojLicznik: if zone == "zone3": pPETable = PPETable.get(PPETable.id == meter_id) return pPETable.zone3 - return None \ No newline at end of file + return None