File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ jobs:
2525 --health-retries 5
2626
2727 steps :
28- - uses : actions/checkout@v4
28+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2929
3030 - name : Install uv
31- uses : astral-sh/setup-uv@v4
31+ uses : astral-sh/setup-uv@857947113170757f49551c65d6484e5088f117c0 # v4.2.0
3232 with :
3333 enable-cache : true
3434
3535 - name : Set up Python 3.12
36- uses : actions/setup-python@v5
36+ uses : actions/setup-python@f6742a91b3c2a4176985474360e200155b9e0f6b # v5.1.1
3737 with :
3838 python-version : " 3.12"
3939
Original file line number Diff line number Diff line change @@ -12,11 +12,19 @@ FROM python:3.12-slim-bookworm
1212
1313WORKDIR /app
1414
15- COPY --from=builder /app/.venv /app/.venv
15+ RUN useradd -m -u 1000 appuser && \
16+ chown appuser:appuser /app
17+
18+ COPY --from=builder --chown=appuser:appuser /app/.venv /app/.venv
1619
1720ENV PATH="/app/.venv/bin:$PATH"
1821
19- COPY . .
22+ COPY --chown=appuser:appuser src/ ./src/
23+ COPY --chown=appuser:appuser migrations/ ./migrations/
24+ COPY --chown=appuser:appuser alembic.ini pyproject.toml uv.lock ./
25+ COPY --chown=appuser:appuser scripts/ ./scripts/
26+
27+ USER appuser
2028
2129EXPOSE 8000
2230
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ async def override_get_session():
4848 "Content-Type" : "application/json" ,
4949 }
5050 async with AsyncClient (
51- base_url = "http ://test" ,
51+ base_url = "https ://test" ,
5252 transport = transport ,
5353 headers = headers ,
5454 ) as client :
You can’t perform that action at this time.
0 commit comments