Skip to content

Commit 7426845

Browse files
committed
fix
1 parent 1773e7c commit 7426845

File tree

2 files changed

+78
-37
lines changed

2 files changed

+78
-37
lines changed

apps/backend/Dockerfile

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,19 @@
1-
# Use a Python image with uv pre-installed
2-
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
1+
FROM python:3.13-slim
32

4-
# Install the project into `/app`
3+
# Set the working directory inside the container
54
WORKDIR /app
65

7-
# Enable bytecode compilation
8-
ENV UV_COMPILE_BYTECODE=1
6+
# Copy the requirements file to the working directory
7+
COPY requirements.txt .
98

10-
# Copy from the cache instead of linking since it's a mounted volume
11-
ENV UV_LINK_MODE=copy
9+
# Install the Python dependencies
10+
RUN pip install -r requirements.txt
1211

13-
# Ensure installed tools can be executed out of the box
14-
ENV UV_TOOL_BIN_DIR=/usr/local/bin
12+
# Copy the application code to the working directory
13+
COPY . .
1514

16-
# Install the project's dependencies using the lockfile and settings
17-
RUN --mount=type=cache,target=/root/.cache/uv \
18-
--mount=type=bind,source=uv.lock,target=uv.lock \
19-
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
20-
uv sync --locked --no-install-project --no-dev
15+
# Expose the port on which the application will run
16+
EXPOSE 8000
2117

22-
# Then, add the rest of the project source code and install it
23-
# Installing separately from its dependencies allows optimal layer caching
24-
COPY . /app
25-
RUN --mount=type=cache,target=/root/.cache/uv \
26-
uv sync --locked --no-dev
27-
28-
# Place executables in the environment at the front of the path
29-
ENV PATH="/app/.venv/bin:$PATH"
30-
31-
# Reset the entrypoint, don't invoke `uv`
32-
ENTRYPOINT []
33-
34-
# Run the FastAPI application by default
35-
# Uses `fastapi dev` to enable hot-reloading when the `watch` sync occurs
36-
# Uses `--host 0.0.0.0` to allow access from outside the container
37-
CMD ["uvicorn", "main:app", \
38-
"--host", "0.0.0.0", \
39-
"--port", "8000", \
40-
"--workers", "1", \
41-
"--limit-concurrency", "100", \
42-
"--limit-max-requests", "1000", \
43-
"--timeout-keep-alive", "5", \
44-
"--access-log"]
18+
# Run the FastAPI application using uvicorn server
19+
CMD ["uvicorn", "fastapi:app", "--host", "0.0.0.0", "--port", "8000"]

apps/backend/requirements.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
aiohappyeyeballs==2.6.1
2+
aiohttp==3.11.18
3+
aiosignal==1.3.2
4+
aiosqlite==0.21.0
5+
alembic==1.15.2
6+
annotated-types==0.7.0
7+
anyio==4.9.0
8+
apscheduler==3.11.0
9+
asyncpg==0.30.0
10+
attrs==25.3.0
11+
certifi==2025.4.26
12+
click==8.1.8
13+
dnspython==2.7.0
14+
ecdsa==0.19.1
15+
email-validator==2.2.0
16+
fastapi==0.115.12
17+
fastapi-cli==0.0.7
18+
fastapi-cloud-cli==0.1.5
19+
frozenlist==1.6.0
20+
greenlet==3.2.1
21+
h11==0.16.0
22+
httpcore==1.0.9
23+
httptools==0.6.4
24+
httpx==0.28.1
25+
idna==3.10
26+
jinja2==3.1.6
27+
mako==1.3.10
28+
markdown-it-py==3.0.0
29+
markupsafe==3.0.2
30+
mdurl==0.1.2
31+
multidict==6.4.3
32+
passlib==1.7.4
33+
propcache==0.3.1
34+
psycopg2-binary==2.9.10
35+
pyasn1==0.4.8
36+
pydantic==2.11.3
37+
pydantic-core==2.33.1
38+
pydantic-settings==2.9.1
39+
pygments==2.19.1
40+
python-dotenv==1.1.0
41+
python-jose==3.4.0
42+
python-multipart==0.0.20
43+
pyyaml==6.0.2
44+
redis==6.2.0
45+
rich==14.0.0
46+
rich-toolkit==0.14.3
47+
rignore==0.6.4
48+
rsa==4.9.1
49+
ruff==0.11.7
50+
sentry-sdk==2.37.1
51+
shellingham==1.5.4
52+
six==1.17.0
53+
sniffio==1.3.1
54+
sqlalchemy==2.0.40
55+
starlette==0.46.2
56+
typer==0.15.2
57+
typing-extensions==4.13.2
58+
typing-inspection==0.4.0
59+
tzlocal==5.3.1
60+
urllib3==2.5.0
61+
uuid==1.30
62+
uvicorn==0.34.2
63+
uvloop==0.21.0
64+
watchfiles==1.0.5
65+
websockets==15.0.1
66+
yarl==1.20.0

0 commit comments

Comments
 (0)