diff --git a/CHANGELOG b/CHANGELOG index f33cec0..a4707c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. +## [unreleased] + +### 🐛 Bug Fixes + +- Have uvicorn use Settings.port and Settings.host + +## [0.3.2] - 2025-03-06 + +### ⚙️ Miscellaneous Tasks + +- Update charts to v0.3.2 + ## [0.3.1] - 2025-03-06 ### 🐛 Bug Fixes diff --git a/Dockerfile b/Dockerfile index f58efb1..1c46f90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ENV PYTHONPATH="$APP_PATH" ENV PATH="$APP_HOME/.local/bin:$PATH" # hadolint ignore=DL3001,DL3008,DL3018 -RUN apk add --no-cache make python3~=3.12 \ +RUN apk add --no-cache make python3~=3.12 curl \ && adduser -S -u "$USERID" -h "$APP_HOME" "$USERNAME" \ && mkdir -p "$APP_PATH" \ && chown -R "$USERID:$GROUPID" "$APP_PATH" @@ -40,6 +40,7 @@ FROM base AS serve CMD ["make", "serve"] + FROM base AS migrate CMD ["make", "migrate"] \ No newline at end of file diff --git a/Makefile b/Makefile index b17fc9f..243b013 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ tests: uv run coverage xml serve: - uv run uvicorn src.apps.httpapi.litestar.main:app + uv run python src/apps/httpapi/litestar/main.py build: docker build . -t git.roboces.dev/catalin/$(PROJECT_NAME):$(PROJECT_TAG) --target $(PROJECT_TARGET) diff --git a/charts/huesoporro/Chart.yaml b/charts/huesoporro/Chart.yaml index 2147082..2f7c8f0 100644 --- a/charts/huesoporro/Chart.yaml +++ b/charts/huesoporro/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -appVersion: 0.3.2 +appVersion: 0.3.3 description: A Helm chart for Kubernetes name: huesoporro type: application -version: 0.3.2 +version: 0.3.3 diff --git a/charts/huesoporro/values.yaml b/charts/huesoporro/values.yaml index 1c3bd9a..815bfda 100644 --- a/charts/huesoporro/values.yaml +++ b/charts/huesoporro/values.yaml @@ -8,7 +8,7 @@ fullnameOverride: '' image: pullPolicy: Always repository: git.roboces.dev/catalin/huesoporro - tag: 0.3.2 + tag: 0.3.3 imagePullSecrets: [] ingress: annotations: {} diff --git a/pyproject.toml b/pyproject.toml index 46b32ec..044ff55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "huesoporro" -version = "0.3.2" +version = "0.3.3" description = "Misc Twitch bot" readme = "README.md" authors = [ diff --git a/src/apps/httpapi/litestar/main.py b/src/apps/httpapi/litestar/main.py index 44ee9c8..47b8bcd 100644 --- a/src/apps/httpapi/litestar/main.py +++ b/src/apps/httpapi/litestar/main.py @@ -1,4 +1,5 @@ import httpx +import uvicorn from litestar import Litestar, get from litestar.contrib.jinja import JinjaTemplateEngine from litestar.di import Provide @@ -113,3 +114,10 @@ def create_app(): app = create_app() + + +if __name__ == "__main__": + s = Settings.get() + config = uvicorn.Config("main:app", host=s.port, port=s.port, log_level="info") + server = uvicorn.Server(config) + server.run() diff --git a/uv.lock b/uv.lock index b349f89..b5c850d 100644 --- a/uv.lock +++ b/uv.lock @@ -517,7 +517,7 @@ wheels = [ [[package]] name = "huesoporro" -version = "0.3.0" +version = "0.3.3" source = { editable = "." } dependencies = [ { name = "aiosqlite" },