change workdir and fix uv venv usage

This commit is contained in:
2026-02-21 12:19:49 +01:00
parent 1793be90e1
commit 22c85b5032
3 changed files with 5 additions and 5 deletions

View File

@@ -1,8 +1,10 @@
FROM python:3.14-alpine
ENV PYTHONUNBUFFERED=1
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
WORKDIR /code/
WORKDIR /app
COPY pyproject.toml .
RUN uv venv && uv pip install -r pyproject.toml
ENV VIRTUAL_ENV=/opt/venv
RUN uv venv $VIRTUAL_ENV && uv pip install -r pyproject.toml
ENV PATH="/opt/venv/bin:$PATH"
COPY . .
ENTRYPOINT ["./entrypoint.sh"]

View File

@@ -26,4 +26,4 @@ services:
ports:
- "80:8000"
volumes:
- .:/code:rw
- .:/app

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env sh
set -e
. .venv/bin/activate
if [ "$DJANGO_PRODUCTION_MODE" = "true" ]; then
echo "starting production server ..."
gunicorn --bind=0.0.0.0:8000 --workers=2 gaehsnitzproject.wsgi