Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (43 loc) 路 1.5 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (43 loc) 路 1.5 KB
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
46
47
48
49
50
51
52
53
# This tool was written by @keyiflerolsun | for @KekikAkademi
# * Docker Image
FROM python:3.14.3-slim-trixie
# * Non-interactive apt/locale setup
ENV DEBIAN_FRONTEND=noninteractive
# * Use a safe locale during build (C.UTF-8 comes pre-installed)
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
# * Workspace
WORKDIR /usr/src/ExampleProvider
COPY ./ /usr/src/ExampleProvider
# * Install locales and generate TR locale
RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
# git \
# ffmpeg \
# opus-tools \
locales \
curl \
tzdata && \
sed -i 's/^# *tr_TR.UTF-8 UTF-8/tr_TR.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen tr_TR.UTF-8 && \
update-locale LANG=tr_TR.UTF-8 LC_ALL=tr_TR.UTF-8 LANGUAGE=tr_TR:tr && \
ln -fs /usr/share/zoneinfo/Europe/Istanbul /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# * Standard environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING="UTF-8" \
LANG="tr_TR.UTF-8" \
LC_ALL="tr_TR.UTF-8" \
LANGUAGE="tr_TR:tr" \
TZ="Europe/Istanbul"
# * uv installation
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# * Install dependencies
RUN uv pip install --system --no-cache .
# * Health Check
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS http://127.0.0.1:3310/api/v1/health || exit 1
# * Start the Application
CMD ["python3", "run.py"]