File tree Expand file tree Collapse file tree 2 files changed +85
-0
lines changed
Expand file tree Collapse file tree 2 files changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ # Byte-compiled / optimized / DLL files
2+ __pycache__ /
3+ * .py [cod ]
4+ * $py.class
5+
6+ # Distribution / packaging
7+ .Python
8+ build /
9+ develop-eggs /
10+ dist /
11+ downloads /
12+ eggs /
13+ .eggs /
14+ lib /
15+ lib64 /
16+ parts /
17+ sdist /
18+ var /
19+ wheels /
20+ pip-wheel-metadata /
21+ share /python-wheels /
22+ * .egg-info /
23+ .installed.cfg
24+ * .egg
25+
26+ # Virtual environments
27+ .env
28+ .venv
29+ env /
30+ venv /
31+ ENV /
32+ env.bak /
33+ venv.bak /
34+
35+ # IDEs and editors
36+ .vscode /
37+ .idea /
38+ * .sublime-project
39+ * .sublime-workspace
40+
41+ # Logs and caches
42+ * .log
43+ logs /
44+ .cache /
45+
46+ # OS files
47+ .DS_Store
48+ Thumbs.db
49+
50+ # Poetry lock file (optional – some teams prefer to version-control this)
51+ poetry.lock
Original file line number Diff line number Diff line change 1+ # Use slim Python 3.12 as the base image
2+ FROM python:3.12-slim
3+
4+ # Set environment variables for Python and prevent the creation of .pyc files
5+ ENV PYTHONDONTWRITEBYTECODE=1
6+ ENV PYTHONUNBUFFERED=1
7+
8+ # Install OS dependencies required for building some Python packages
9+ RUN apt-get update && apt-get install -y --no-install-recommends \
10+ build-essential \
11+ curl \
12+ && rm -rf /var/lib/apt/lists/*
13+
14+ # Install Poetry
15+ RUN pip install --upgrade pip && pip install poetry
16+
17+ # Set working directory
18+ WORKDIR /app
19+
20+ # Copy project metadata files and install dependencies (if using Poetry)
21+ COPY pyproject.toml poetry.lock* /app/
22+
23+ # Configure Poetry to not create a virtual environment and install dependencies
24+ RUN poetry config virtualenvs.create false && \
25+ poetry install --no-interaction --no-ansi --no-dev
26+
27+ # Copy the rest of the project
28+ COPY . /app
29+
30+ # Expose port 8080 (if required)
31+ EXPOSE 8080
32+
33+ # Set the default command to run the application
34+ CMD ["python" , "main.py" ]
You can’t perform that action at this time.
0 commit comments