+
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-04-04 12:41:37 +10:00
parent 1d00f0da7f
commit a86aadcada
2 changed files with 11 additions and 12 deletions

View File

@@ -47,6 +47,7 @@ steps:
from_secret: ssh_password from_secret: ssh_password
port: 22 port: 22
script: script:
- export DOCKER_HOST="unix:///var/run/docker.sock"
- docker stop gptchat || true - docker stop gptchat || true
- docker rm gptchat || true - docker rm gptchat || true
- docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest - docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest

View File

@@ -2,19 +2,17 @@ FROM python:3.11-slim
WORKDIR /app WORKDIR /app
# Копируем requirements.txt для установки зависимостей RUN apt-get update && apt-get install -y --no-install-recommends curl \
COPY requirements.txt . && rm -rf /var/lib/apt/lists/*
RUN useradd -m -s /bin/bash appuser
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Установка зависимостей в один слой + очистка кэша
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/* && \
pip install --no-cache-dir -r requirements.txt && \
pip cache purge
# Копирование исходников
COPY . . COPY . .
RUN useradd -m -s /bin/bash appuser && \
chown -R appuser:appuser /app RUN chown -R appuser:appuser /app
USER appuser USER appuser