-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 925 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (29 loc) · 925 Bytes
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
FROM python:3.11-slim
# Version label - update this when making changes
LABEL version="1.0.19"
LABEL description="Usefull Tools Collection"
WORKDIR /app
# Install build dependencies only (ffmpeg installed at runtime)
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir gunicorn psutil
# Copy application code
COPY . .
# Download vendor libraries
RUN python scripts/download_vendor_libs.py
# Create necessary directories
RUN mkdir -p data geoip_data instance
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
ENV PYTHONUNBUFFERED=1
# Expose port
EXPOSE 5000
# Make entrypoint executable and use it
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]