- рефакторинг приложения
- снова изменения в Readme - работа над валидацией параметров - большая гибкость и конфигурироемость
This commit is contained in:
+10
-5
@@ -4,11 +4,12 @@ FROM python:3.10-slim
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
# Install system dependencies including openssl
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ffmpeg \
|
||||
git \
|
||||
curl \
|
||||
openssl \
|
||||
python3-pip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -24,13 +25,17 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy application code
|
||||
COPY app.py .
|
||||
|
||||
# Create directory for models and keys
|
||||
# Copy startup script for key generation
|
||||
COPY docker-entrypoint.sh .
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
|
||||
# Create directory for models and data
|
||||
RUN mkdir -p /app/models /app/data
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV MODEL_DOWNLOAD_ROOT=/app/models
|
||||
ENV KEYS_FILE=/app/data/keys.txt
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=9854
|
||||
|
||||
# Expose port
|
||||
EXPOSE 9854
|
||||
@@ -40,4 +45,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD curl -f http://localhost:9854/health || exit 1
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "app.py"]
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user