FROM fedora-minimal:latest

RUN microdnf install -y python3-pip && pip install uv

WORKDIR /app
COPY requirements.txt .

RUN uv venv /app/venv && \
	source /app/venv/bin/activate && \
	uv pip install -r requirements.txt

# Copy data for add-on
COPY database_empty.sqlite data/database.sqlite
COPY rund.sh .
COPY run.py .
COPY main.py .
COPY api.py .
COPY moj_licznik.py .
COPY log_config.py .
RUN chmod a+x rund.sh


CMD [ "/app/rund.sh" ]
