update repository references and improve script handling

This commit is contained in:
2025-03-19 23:55:05 +01:00
parent ecce3bf159
commit c21d5cbc19
4 changed files with 28 additions and 24 deletions

View File

@@ -37,6 +37,7 @@ build:
push:
@echo "Отправляем образы в Docker Hub..."
@docker login
@for dockerfile in $(BASE_IMAGE_DOCKERFILES); do \
dir=$$(dirname $$dockerfile); \
tag_name=$$(echo $$dir | sed 's|^\./||' | tr '/' '-' | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]'); \

View File

@@ -0,0 +1,14 @@
FROM python:3.11-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc curl && \
pip install --no-cache-dir uvloop && \
apt-get remove -y gcc && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrc
CMD ["python"]

View File

@@ -1,25 +1,14 @@
FROM python:3.11-buster
FROM mesteriis/hassio-python-3.11:latest
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
libpq-dev \
libjpeg-dev \
libwebp-dev \
libtiff5-dev \
zlib1g-dev \
libxml2-dev \
libxslt1-dev \
libldap2-dev \
libsasl2-dev \
libmysqlclient-dev \
default-libmysqlclient-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY requirements.txt /tmp/
RUN pip install --no-cache-dir -r /tmp/requirements.txt
COPY ./src /app
WORKDIR /app
# Expose the port the app runs on
EXPOSE 8000
# Run the application
CMD ["uvicorn", "main:app"]
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --upgrade wheel
RUN pip install uv

View File

@@ -15,6 +15,6 @@
"options": {},
"schema": {},
"ports": {
"5000/tcp": 5000
"8000/tcp": 8000
}
}