-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
468 additions
and
480 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
FROM docker.io/python:3 AS builder | ||
WORKDIR /usr/src | ||
ENV PIPENV_VENV_IN_PROJECT=1 | ||
RUN pip install --user pipenv | ||
ADD Pipfile.lock Pipfile /usr/src/ | ||
RUN /root/.local/bin/pipenv sync | ||
# Install uv | ||
FROM docker.io/python:3.12-slim AS builder | ||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
||
FROM docker.io/python:3 | ||
WORKDIR /usr/src/app | ||
# Change the working directory to the `app` directory | ||
WORKDIR /app | ||
|
||
COPY --from=builder /usr/src/.venv /usr/src/app/.venv | ||
COPY . . | ||
# Install dependencies | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
--mount=type=bind,source=uv.lock,target=uv.lock \ | ||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | ||
uv sync --frozen --no-install-project --no-editable | ||
|
||
CMD [".fly/start.sh"] | ||
# Copy the project into the intermediate image | ||
ADD . /app | ||
|
||
# Sync the project | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv sync --frozen --no-editable | ||
|
||
FROM docker.io/python:3.12-slim | ||
|
||
# Copy the environment, but not the source code | ||
COPY --from=builder --chown=app:app /app/.venv /app/.venv | ||
|
||
# Run the application | ||
CMD ["/app/.venv/bin/home-exporter"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[project] | ||
name = "home-exporter" | ||
version = "0.1.0" | ||
description = "🏠 Home InfluxDB Exporter" | ||
readme = "README.md" | ||
requires-python = ">=3.12" | ||
dependencies = [ | ||
"evohomeclient>=0.3.7", | ||
"influxdb3-python>=0.9.0", | ||
"lowatt-grdf>=2.3.0", | ||
"python-dotenv>=1.0.1", | ||
"requests>=2.32.3", | ||
"schedule>=1.2.2", | ||
"sentry-sdk>=2.16.0", | ||
] | ||
|
||
[project.scripts] | ||
home-exporter = "home_exporter:main" | ||
# lint = "ruff check ." | ||
# format = "ruff check . --fix" | ||
|
||
[tool.uv] | ||
package = true | ||
dev-dependencies = [ | ||
"ruff>=0.6.9", | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.