File size: 1,086 Bytes
805fa80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
869d071
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# πŸš€ Nova AI Docker Image
FROM python:3.9-slim

# πŸ“‹ Metadata
LABEL maintainer="Teknova <teknova@example.com>"
LABEL description="Teknova Nova AI - Γ–zgΓΌn yapay zeka teknolojisi"
LABEL version="1.0.0"

# πŸ”§ Environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1

# πŸ“‚ Working directory
WORKDIR /app

# πŸ”§ System dependencies
RUN apt-get update && apt-get install -y \

    gcc \
    g++ \
    && rm -rf /var/lib/apt/lists/*

# πŸ“¦ Copy requirements first (for better caching)
COPY requirements.txt .

# 🐍 Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# πŸ“ Copy application code
COPY . .

# πŸ‘€ Create non-root user
RUN useradd -m -u 1000 novaai && chown -R novaai:novaai /app
USER novaai

# 🌐 Expose port
EXPOSE 8000

# πŸš€ Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \

    CMD curl -f http://localhost:8000/ || exit 1

# πŸƒ Run application
CMD ["python", "app.py"]